Files
coredns/.golangci.yml
Ville Vesilehto 3080ec0448 lint(errorlint): handle wrapped errors
Enable errorlint and preserve wrapped error chains so runtime checks
and tests classify failures correctly. This also makes Route53
surface insert failures instead of silently dropping them.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
2026-04-25 11:57:32 +03:00

126 lines
2.2 KiB
YAML

version: "2"
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
default: none
enable:
- canonicalheader
- copyloopvar
- durationcheck
- errorlint
- godoclint
- gosec
- govet
- ineffassign
- intrange
- modernize
- nakedret
- nolintlint
- perfsprint
- prealloc
- protogetter
- staticcheck
- thelper
- revive
- unconvert
- unused
- usetesting
- wastedassign
- whitespace
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- perfsprint
- gosec
settings:
govet:
enable:
- nilness
perfsprint:
error-format: false
revive:
rules:
- name: blank-imports
- name: context-as-argument
arguments:
- allowTypesBefore: "*testing.T"
- name: context-keys-type
- name: dot-imports
- name: early-return
arguments:
- "preserveScope"
- name: empty-block
disabled: true
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: increment-decrement
- name: indent-error-flow
arguments:
- "preserveScope"
- name: range
- name: receiver-naming
- name: redefines-builtin-id
disabled: true
- name: superfluous-else
arguments:
- "preserveScope"
- name: time-naming
disabled: true
- name: unexported-return
disabled: true
- name: unnecessary-stmt
- name: unreachable-code
- name: unused-parameter
arguments:
- allowRegex: "^_"
- name: use-any
- name: var-declaration
- name: var-naming
disabled: true
arguments:
- ["ID"]
- ["VM"]
- - upperCaseConst: true
formatters:
enable:
- gofmt
exclusions:
generated: lax