librapi/.golangci.yml
2025-11-24 15:58:29 +01:00

101 lines
1.7 KiB
YAML

version: "2"
linters:
default: none
enable:
- bodyclose
- copyloopvar
- dogsled
- dupl
- errcheck
- exhaustive
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- goprintffuncname
- gosec
- govet
- ineffassign
- lll
- misspell
- mnd
- nakedret
- noctx
- nolintlint
- staticcheck
- unconvert
- unparam
- unused
- whitespace
settings:
dupl:
threshold: 100
errcheck:
check-blank: true
exclude-functions:
- (*github.com/gin-gonic/gin.Error).SetType
- (*github.com/gin-gonic/gin.Context).Error
funlen:
lines: 100
statements: 50
goconst:
min-len: 2
min-occurrences: 2
gocritic:
disabled-checks:
- dupImport
- ifElseChain
- octalLiteral
- wrapperFunc
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
gocyclo:
min-complexity: 15
lll:
line-length: 200
misspell:
locale: US
mnd:
checks:
- argument
- case
- condition
- return
nolintlint:
require-explanation: false
require-specific: false
allow-unused: false
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
settings:
gci:
sections:
- prefix(fetchsysd)
goimports:
local-prefixes:
- localenv
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$