2025-05-26 21:12:58 +02:00
|
|
|
version: "2"
|
2019-06-23 20:40:59 +01:00
|
|
|
linters:
|
2025-05-26 21:12:58 +02:00
|
|
|
default: none
|
2019-06-23 20:40:59 +01:00
|
|
|
enable:
|
2020-04-14 17:36:44 +09:00
|
|
|
- bodyclose
|
2025-05-26 21:12:58 +02:00
|
|
|
- copyloopvar
|
2020-04-14 17:36:44 +09:00
|
|
|
- dogsled
|
2025-05-26 21:12:58 +02:00
|
|
|
- goconst
|
|
|
|
- gocritic
|
2020-04-14 17:36:44 +09:00
|
|
|
- goprintffuncname
|
2025-05-26 21:12:58 +02:00
|
|
|
- gosec
|
|
|
|
- govet
|
|
|
|
- ineffassign
|
2020-04-14 17:36:44 +09:00
|
|
|
- misspell
|
|
|
|
- prealloc
|
2023-10-24 16:31:32 +02:00
|
|
|
- revive
|
2025-05-26 21:12:58 +02:00
|
|
|
- staticcheck
|
|
|
|
- unconvert
|
|
|
|
- unused
|
|
|
|
exclusions:
|
|
|
|
generated: lax
|
|
|
|
presets:
|
|
|
|
- comments
|
|
|
|
- common-false-positives
|
|
|
|
- legacy
|
|
|
|
- std-error-handling
|
|
|
|
rules:
|
|
|
|
- linters:
|
|
|
|
- bodyclose
|
|
|
|
- goconst
|
|
|
|
- gocritic
|
|
|
|
- gosec
|
|
|
|
- revive
|
|
|
|
- scopelint
|
|
|
|
- unconvert
|
|
|
|
path: _test\.go
|
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
path: _test\.go
|
|
|
|
text: 'dot-imports:'
|
|
|
|
# # If we have tests in shared test folders, these can be less strictly linted
|
|
|
|
- linters:
|
|
|
|
- bodyclose
|
|
|
|
- revive
|
|
|
|
- staticcheck
|
|
|
|
path: tests/.*_tests\.go
|
|
|
|
# See https://github.com/oauth2-proxy/oauth2-proxy/issues/3060
|
|
|
|
# https://staticcheck.dev/docs/checks/#QF1008
|
|
|
|
- linters:
|
|
|
|
- staticcheck
|
|
|
|
text: QF1008
|
2025-07-13 14:55:57 -05:00
|
|
|
- linters:
|
|
|
|
- revive
|
|
|
|
path: util/.*\.go$
|
|
|
|
text: "var-naming: avoid meaningless package names"
|
2025-05-26 21:12:58 +02:00
|
|
|
paths:
|
|
|
|
- third_party$
|
|
|
|
- builtin$
|
|
|
|
- examples$
|
|
|
|
formatters:
|
|
|
|
enable:
|
|
|
|
- gofmt
|
|
|
|
- goimports
|
|
|
|
exclusions:
|
|
|
|
generated: lax
|
|
|
|
paths:
|
|
|
|
- third_party$
|
|
|
|
- builtin$
|
|
|
|
- examples$
|