Files
gluetun/.golangci.yml
2022-08-12 23:54:20 +00:00

119 lines
2.5 KiB
YAML

linters-settings:
misspell:
locale: US
issues:
exclude-rules:
- path: _test\.go
linters:
- dupl
- goerr113
- containedctx
- path: "internal\\/server\\/.+\\.go"
linters:
- dupl
- path: "internal\\/configuration\\/settings\\/.+\\.go"
linters:
- dupl
- text: "^mnd: Magic number: 0[0-9]{3}, in <argument> detected$"
source: "^.+= os\\.OpenFile\\(.+, .+, 0[0-9]{3}\\)"
linters:
- gomnd
- text: "^mnd: Magic number: 0[0-9]{3}, in <argument> detected$"
source: "^.+= os\\.MkdirAll\\(.+, 0[0-9]{3}\\)"
linters:
- gomnd
- linters:
- lll
source: "^//go:generate .+$"
- text: "returns interface \\(github\\.com\\/vishvananda\\/netlink\\.Link\\)"
linters:
- ireturn
- text: "_main contains underscore\\. You should use mixedCap or MixedCap\\."
path: "cmd\\/gluetun\\/main\\.go"
linters:
- nosnakecase
- text: "O_[A-Z]+ contains underscore\\. You should use mixedCap or MixedCap\\."
linters:
- nosnakecase
- text: "Stat_t contains underscore\\. You should use mixedCap or MixedCap\\."
linters:
- nosnakecase
- text: "S_IFCHR contains underscore\\. You should use mixedCap or MixedCap\\."
linters:
- nosnakecase
- text: "FAMILY_(ALL|V4|V6) contains underscore\\. You should use mixedCap or MixedCap\\."
path: "internal\\/(netlink|routing|wireguard)\\/.+\\.go"
linters:
- nosnakecase
linters:
enable:
# - cyclop
# - errorlint
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupl
- durationcheck
- errchkjson
- errname
- execinquery
- exhaustive
- exportloopref
- forcetypeassert
- gci
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- goerr113
- goheader
- goimports
- gomnd
- gomoddirectives
- goprintffuncname
- gosec
- grouper
- importas
- ireturn
- lll
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- noctx
- nolintlint
- nosnakecase
- nosprintfhostport
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- tenv
- thelper
- tparallel
- unconvert
- unparam
- usestdlibvars
- wastedassign
- whitespace
run:
skip-dirs:
- .devcontainer
- .github
- doc