How to Use golangci-lint Configuration for Team Standards

Create a `.golangci.yml` file in your project root to define team standards, then run `golangci-lint run ./...` to enforce them. This configuration enables specific linters and formatters while disabling defaults to ensure consistent code quality across the team.

How to Use golangci-lint Configuration for Team Standards

Create a .golangci.yml file in your project root to define team standards, then run golangci-lint run ./... to enforce them. This configuration enables specific linters and formatters while disabling defaults to ensure consistent code quality across the team.

version: "2"
linters:
  default: none
  enable:
    - govet
    - ineffassign
formatters:
  enable:
    - gofmt
    - gofumpt
  settings:
    gofmt:
      simplify: true
    gofumpt:
      module-path: github.com/jackc/pgx/v5
      extra-rules: true

Run the linter with:

golangci-lint run ./...