version: "2" run: concurrency: 2 linters: default: none enable: - copyloopvar - depguard - errcheck - errorlint - forbidigo - gocritic - gocyclo - gomodguard - govet - ineffassign - lll - misspell - nakedret - nolintlint - revive - staticcheck - testifylint - unconvert - unparam - unused settings: depguard: rules: all: deny: - pkg: io/ioutil desc: io/ioutil package has been deprecated - pkg: github.com/docker/docker/errdefs desc: use github.com/containerd/errdefs instead. - pkg: golang.org/x/exp/maps desc: use stdlib maps package - pkg: golang.org/x/exp/slices desc: use stdlib slices package - pkg: gopkg.in/yaml.v2 desc: compose-go uses yaml.v3 forbidigo: analyze-types: true forbid: - pattern: 'context\.Background' pkg: '^context$' msg: "in tests, use t.Context() instead of context.Background()" - pattern: 'context\.TODO' pkg: '^context$' msg: "in tests, use t.Context() instead of context.TODO()" gocritic: disabled-checks: - paramTypeCombine - unnamedResult - whyNoLint enabled-tags: - diagnostic - opinionated - style gocyclo: min-complexity: 16 gomodguard: blocked: modules: - github.com/pkg/errors: recommendations: - errors - fmt versions: - github.com/distribution/distribution: reason: use distribution/reference - gotest.tools: version: < 3.0.0 reason: deprecated, pre-modules version lll: line-length: 200 revive: rules: - name: package-comments disabled: true exclusions: generated: lax paths: - third_party$ - builtin$ - examples$ rules: - path-except: '_test\.go' linters: - forbidigo issues: max-issues-per-linter: 0 max-same-issues: 0 formatters: enable: - gci - gofumpt exclusions: generated: lax paths: - third_party$ - builtin$ - examples$ settings: gci: sections: - standard - default - localmodule custom-order: true # make the section order the same as the order of "sections".