teleport/.golangci.yml

64 lines
1.8 KiB
YAML
Raw Normal View History

issues:
exclude-rules:
2021-10-19 18:00:24 +00:00
- linters:
- gosimple
text: "S1002: should omit comparison to bool constant"
2021-10-19 18:00:24 +00:00
- linters:
- revive
text: "exported: exported const"
# TODO(hugoShaka): Remove once https://github.com/dominikh/go-tools/issues/1294 is fixed
- linters:
- unused
path: 'operator/controllers/resources/(.+)_controller_test\.go'
# 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
exclude-use-default: true
max-same-issues: 0
max-issues-per-linter: 0
linters:
disable-all: true
enable:
- bodyclose
- depguard
2022-10-28 20:20:28 +00:00
- gci
- goimports
- gosimple
- govet
- ineffassign
- misspell
2021-10-19 18:00:24 +00:00
- revive
- staticcheck
- unconvert
- unused
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'
- github.com/golang/protobuf: 'use "google.golang.org/protobuf"'
- github.com/siddontang/go-log/log: 'use "github.com/sirupsen/logrus" instead'
- go.uber.org/atomic: 'use "sync/atomic" instead'
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.
output:
uniq-by-line: false
run:
skip-dirs-use-default: false
timeout: 5m
go: '1.18'