nix/.golangci.yml
2025-12-15 22:21:58 +01:00

124 lines
2.0 KiB
YAML

version: "2"
run:
timeout: 3m
relative-path-mode: gitroot
linters:
enable:
- bidichk
- bodyclose
- canonicalheader
- copyloopvar
- errcheck
- errorlint
- exhaustive
- forbidigo
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- gocritic
- gosec
- govet
- ineffassign
- makezero
- mirror
- misspell
- nakedret
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
- prealloc
- predeclared
- sloglint
- spancheck
- staticcheck
- unconvert
- unconvert
- unparam
- unused
- whitespace
- usestdlibvars
- wastedassign
- whitespace
- wsl_v5
settings:
errcheck:
check-type-assertions: true
forbidigo:
analyze-types: true
gocritic:
disabled-checks:
- hugeParam
- paramTypeCombine
- sloppyReassign
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
govet:
enable:
- shadow
nolintlint:
require-explanation: true
require-specific: true
sloglint:
attr-only: true
no-global: all
context: scope
static-msg: true
key-naming-case: snake
forbidden-keys:
- time
- level
- msg
- source
staticcheck:
checks:
- all
- -ST1000
wsl_v5:
disable:
- decl
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(go.yrps.dev)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
issues:
max-issues-per-linter: 0
max-same-issues: 0
output:
sort-order:
- file
show-stats: false