Skip to content

Commit 4326d24

Browse files
soniricoclaude
andcommitted
chore: relax linter rules to focus on critical issues
Disabled noisy linters that don't catch bugs: - unused: Too noisy for private fields reserved for future use - unconvert: Style issue, not a bug - unparam: Too noisy - prealloc: Micro-optimization - fieldalignment: Micro-optimization, not worth the noise Disabled gocritic style checks: - unnamedResult, sloppyReassign, unlambda Added gosimple to test file exclusions. This focuses the linter on actual bugs (errcheck, copylocks, staticcheck) while reducing noise from style preferences. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 82dc19b commit 4326d24

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.golangci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ linters:
1010
- govet # Vet examines Go source code
1111
- ineffassign # Detect ineffectual assignments
1212
- staticcheck # Go static analysis
13-
- unused # Check for unused constants, variables, functions and types
1413
- gofmt # Check whether code was gofmt-ed
1514
- goimports # Check import statements are formatted
1615
- misspell # Finds commonly misspelled English words
1716
- revive # Fast, configurable, extensible, flexible linter
1817
- gosec # Security problems
1918
- gocritic # Opinionated linter
20-
- unconvert # Remove unnecessary type conversions
21-
- unparam # Reports unused function parameters
22-
- prealloc # Find slice declarations that could potentially be preallocated
2319
- nolintlint # Reports ill-formed or insufficient nolint directives
20+
disable:
21+
- unused # Too noisy for private fields that may be used in future
22+
- unconvert # Style issue, not a bug
23+
- unparam # Too noisy
24+
- prealloc # Micro-optimization
2425

2526
linters-settings:
2627
errcheck:
@@ -31,6 +32,7 @@ linters-settings:
3132
enable-all: true
3233
disable:
3334
- shadow # Too many false positives
35+
- fieldalignment # Micro-optimization, not worth the noise
3436

3537
revive:
3638
rules:
@@ -47,10 +49,12 @@ linters-settings:
4749
enabled-tags:
4850
- diagnostic
4951
- performance
50-
- style
5152
disabled-checks:
5253
- commentFormatting
5354
- whyNoLint
55+
- unnamedResult
56+
- sloppyReassign
57+
- unlambda
5458

5559
issues:
5660
exclude-rules:
@@ -63,6 +67,7 @@ issues:
6367
- govet
6468
- unparam
6569
- revive
70+
- gosimple
6671

6772
# Allow unsafe in specific files
6873
- path: utils_nalloc\.go

0 commit comments

Comments
 (0)