Files
gonic/.golangci.yml
T
2025-07-30 12:48:04 +01:00

107 lines
1.9 KiB
YAML

version: "2"
linters:
default: none
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- goconst
- gocritic
- gocyclo
- goheader
- gomodguard
- goprintffuncname
- gosec
- gosmopolitan
- govet
- grouper
- importas
- ineffassign
- loggercheck
- makezero
- mirror
- misspell
- nakedret
- nestif
- nilerr
- nosprintfhostport
- paralleltest
- predeclared
- promlinter
- reassign
- rowserrcheck
- sqlclosecheck
- staticcheck
- testableexamples
- thelper
- tparallel
- unconvert
- unparam
- unused
- wastedassign
- whitespace
- zerologlint
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- errcheck
- gochecknoglobals
path: _test\.go
- linters:
- gosec
text: weak cryptographic primitive
- linters:
- gosec
text: weak random number generator
- linters:
- gosec
text: integer overflow conversion
- linters:
- staticcheck
text: at least one file in a package should have a package comment
- linters:
- gocritic
text: should rewrite switch
paths:
- server/assets
- third_party$
- builtin$
- examples$
settings:
staticcheck:
checks:
- all
- "-QF1001"
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- server/assets
- third_party$
- builtin$
- examples$