Files
nix/templates/go/.golangci.yml
2026-06-04 17:15:08 -04:00

87 lines
1.4 KiB
YAML

version: "2"
linters:
default: standard
# default: all
enable:
- bidichk
- containedctx
- contextcheck
- decorder
- depguard
- dupl
- err113
- errchkjson
- errorlint
- exhaustive
- fatcontext
- gocritic
- gosec
- govet
- intrange
- maintidx
- modernize
- nlreturn
- noctx
- perfsprint
- prealloc
- recvcheck
- rowserrcheck
- sloglint
- unparam
- unused
- usestdlibvars
- whitespace
disable:
# Deprecateed
- gomodguard
- wsl
# Comment checker
- revive
- wrapcheck # reinclude
# Not useful
- cyclop
- funlen
- gocognit
- gocyclo
- nestif
- noinlineerr
- tagalign
- tagliatelle
- varnamelen
- wsl_v5
settings:
depguard:
rules:
main:
list-mode: strict
files:
"**/main.go"
allow:
- "$gostd"
catchall:
list-mode: strict
files:
- "!$test"
- "!**/main.go"
- "**/internal/**"
allow:
- "$gostd"
- "golang.org/**"
recvcheck:
disable-builtin: false
exclusions:
- "*.TableName"
sloglint:
attr-only: true
context: "scope"
key-naming-case: "camel"
static-msg: true
# no-raw-keys: true
msg-style: "lowercased"
formatters:
enable:
- goimports
- golines