| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- version: "2"
- run:
- timeout: 10m
- allow-parallel-runners: true
- linters:
- default: none
- enable:
- - asciicheck
- - bodyclose
- - dogsled
- - dupl
- - errcheck
- - errorlint
- - exhaustive
- - copyloopvar
- - goheader
- - goconst
- - gocritic
- - godot
- - goprintffuncname
- - gosec
- - govet
- - ineffassign
- - misspell
- - modernize # A suite of analyzers that suggest simplifications to Go code, using modern language and library features. https://golangci-lint.run/docs/linters/configuration/#modernize
- - nakedret
- - nolintlint
- - prealloc
- - lll
- - unconvert
- - unparam
- - unused
- - whitespace
- - revive
- settings:
- goconst:
- min-len: 3
- min-occurrences: 3
- gocritic:
- enabled-tags:
- - diagnostic
- - experimental
- - opinionated
- - performance
- - style
- disabled-checks:
- - dupImport
- - ifElseChain
- - octalLiteral
- - whyNoLint
- - wrapperFunc
- - importShadow
- - unnamedResult
- - unnecessaryBlock
- settings:
- rangeValCopy:
- sizeThreshold: 512
- hugeParam:
- sizeThreshold: 512
- gocyclo:
- min-complexity: 16
- goheader:
- template-path: ${config-path}/hack/boilerplate.go.txt
- dupl:
- threshold: 200
- govet:
- disable:
- - shadow
- lll:
- line-length: 300
- # staticcheck:
- # checks:
- # - QF1008
- misspell:
- locale: US
- modernize:
- disable:
- - omitzero
- exclusions:
- paths:
- - runtime/template/v2/sprig
- rules:
- # Exclude some linters from running on tests files.
- - path: _test(ing)?\.go
- linters:
- - gocyclo
- - errcheck
- - dupl
- - gosec
- - unparam
- - lll
- - revive
- # Allow dot imports for Ginkgo and Gomega in test files
- - path: _test\.go
- text: "dot-imports:"
- linters:
- - revive
- # Ease some gocritic warnings on test files.
- - path: _test\.go
- text: "(unnamedResult|exitAfterDefer)"
- linters:
- - gocritic
- # Exclude fake or mock packages from revive linter
- - path: /(fake|mock)/
- linters:
- - revive
- # This is a "potential hardcoded credentials" warning. It's triggered by
- # any variable with 'secret' in the same, and thus hits a lot of false
- # positives in Kubernetes land where a Secret is an object type.
- - text: "G101:"
- linters:
- - gosec
- # The header check doesn't correctly parse the header as a code comment and is
- # triggered by the perceived diff. The header check still correctly detects missing
- # license headers and is useful for some cases.
- - text: "Actual:"
- linters:
- - goheader
- issues:
- # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
- max-issues-per-linter: 0
- # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
- max-same-issues: 0
- formatters:
- enable:
- - gci
- - gofmt
- - goimports
- - golines
- settings:
- goimports:
- local-prefixes:
- - github.com/external-secrets/external-secrets
- golines:
- # Target maximum line length.
- # Default: 100
- max-len: 200
- gci:
- sections:
- - "standard"
- - "default"
- - "prefix(github.com/external-secrets/external-secrets)"
- - "blank"
- - "dot"
|