Skip to content

Commit bc81424

Browse files
committed
fix: move exclude-rules to linters.exclusions.rules (golangci-lint v2)
In golangci-lint v2, issues.exclude-rules was renamed to linters.exclusions.rules. The old key caused a schema validation failure aborting the lint run.
1 parent 7c90b5a commit bc81424

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

‎.golangci.yml‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ linters:
3232
- builtinShadow
3333
- unnamedResult
3434
- redundantSprint
35+
exclusions:
36+
rules:
37+
# Exclude staticcheck style suggestions (QF prefix) — these are non-critical
38+
- linters:
39+
- staticcheck
40+
text: "^QF"
41+
# In test files, ignore unchecked errors from test-setup helpers
42+
# (tests fail fast without explicit checks anyway).
43+
- path: "_test\\.go"
44+
linters:
45+
- errcheck
3546

3647
formatters:
3748
enable:
@@ -40,13 +51,3 @@ formatters:
4051
issues:
4152
max-issues-per-linter: 0
4253
max-same-issues: 0
43-
exclude-rules:
44-
# Exclude staticcheck style suggestions (QF prefix) — these are non-critical
45-
- linters:
46-
- staticcheck
47-
text: "^QF"
48-
# In test files, ignore unchecked errors from test-setup helpers and
49-
# json.Decoder.Decode calls where the test will fail naturally on bad data.
50-
- path: "_test\\.go"
51-
linters:
52-
- errcheck

0 commit comments

Comments
 (0)