2021-03-19 16:26:56 +00:00
|
|
|
issues:
|
|
|
|
exclude-rules:
|
2021-10-19 18:00:24 +00:00
|
|
|
- linters:
|
|
|
|
- gosimple
|
2021-03-19 16:26:56 +00:00
|
|
|
text: "S1002: should omit comparison to bool constant"
|
2021-10-19 18:00:24 +00:00
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
text: "exported: exported const"
|
2022-11-10 15:42:18 +00:00
|
|
|
# TODO(hugoShaka): Remove once https://github.com/dominikh/go-tools/issues/1294 is fixed
|
|
|
|
- linters:
|
|
|
|
- unused
|
|
|
|
path: 'operator/controllers/resources/(.+)_controller_test\.go'
|
2022-09-19 22:38:59 +00:00
|
|
|
# TODO(codingllama): Remove ignore after the new golangci-lint image lands.
|
|
|
|
# For some reason this particular files causes problems between different
|
|
|
|
# goimports versions.
|
|
|
|
- path: lib/services/role_test.go
|
|
|
|
linters:
|
|
|
|
- goimports
|
2021-03-19 16:26:56 +00:00
|
|
|
exclude-use-default: true
|
|
|
|
max-same-issues: 0
|
|
|
|
max-issues-per-linter: 0
|
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
- bodyclose
|
2022-03-21 18:00:34 +00:00
|
|
|
- depguard
|
2022-10-28 20:20:28 +00:00
|
|
|
- gci
|
2021-03-19 16:26:56 +00:00
|
|
|
- goimports
|
|
|
|
- gosimple
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
|
|
|
- misspell
|
2021-10-19 18:00:24 +00:00
|
|
|
- revive
|
2021-03-19 16:26:56 +00:00
|
|
|
- staticcheck
|
|
|
|
- unconvert
|
2022-09-19 22:38:59 +00:00
|
|
|
- unused
|
2021-03-19 16:26:56 +00:00
|
|
|
|
2022-03-21 18:00:34 +00:00
|
|
|
linters-settings:
|
|
|
|
depguard:
|
|
|
|
list-type: denylist
|
|
|
|
include-go-root: true # check against stdlib
|
|
|
|
packages-with-error-message:
|
|
|
|
- io/ioutil: 'use "io" or "os" packages instead'
|
2022-09-30 18:19:44 +00:00
|
|
|
- github.com/golang/protobuf: 'use "google.golang.org/protobuf"'
|
2022-06-08 14:41:50 +00:00
|
|
|
- github.com/siddontang/go-log/log: 'use "github.com/sirupsen/logrus" instead'
|
2022-10-05 01:24:46 +00:00
|
|
|
- go.uber.org/atomic: 'use "sync/atomic" instead'
|
2022-07-14 10:51:23 +00:00
|
|
|
misspell:
|
|
|
|
locale: US
|
2022-10-28 20:20:28 +00:00
|
|
|
gci:
|
|
|
|
sections:
|
|
|
|
- standard # Standard section: captures all standard packages.
|
|
|
|
- default # Default section: contains all imports that could not be matched to another section type.
|
|
|
|
- prefix(github.com/gravitational/teleport) # Custom section: groups all imports with the specified Prefix.
|
|
|
|
skip-generated: true # Skip generated files.
|
|
|
|
custom-order: true # Required for "sections" to take effect.
|
2021-03-19 16:26:56 +00:00
|
|
|
output:
|
|
|
|
uniq-by-line: false
|
|
|
|
|
|
|
|
run:
|
|
|
|
skip-dirs-use-default: false
|
|
|
|
timeout: 5m
|
2022-05-11 21:53:37 +00:00
|
|
|
go: '1.18'
|