Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Configures and runs golangci-lint for Go projects: .golangci.yml setup, linter selection, nolint suppressions, and output interpretation.
Use this skill ↓64% 91%+27 ptsof test cases passed
Passed 20 of 22 test cases with the skill, and 14 of 22 without it.
3 of 3 safety checks passed
Not used yet
version: "2"
run:
concurrency: 4
# Timeout for analysis
timeout: 5m
# Include test files
tests: true
issues:
max-issues-per-linter: 0 # 0 = unlimited (we want ALL issues)
max-same-issues: 50
linters:
enable:
# correctness
- govet # built-in checker: copylocks, printf formats, struct tags, unreachable code
- staticcheck # extensive static analysis: deprecated APIs, common mistakes, simplifications
- unused # unused variables, functions, types
- errcheck # unchecked error returns and type assertions
- errorlint # correct use of errors.Is/As and %w wrapping (Go 1.13+)
- nilerr # returning nil error when err is non-nil
- forcetypeassert # type assertions without comma-ok check
- copyloopvar # loop variable copy issues (Go 1.22+)
- durationcheck # detect time.Duration * time.Duration bugs
- reassign # package-level variable reassignment
# style
- gocritic # opinionated style: unnecessary conversions, range copies, redundant code
- revive # naming conventions, exported types, stuttered package names
- wsl_v5 # whitespace and blank line rules for readability
- whitespace # trailing whitespace, unnecessary blank lines
- godot # exported-symbol comments must end with a period
- misspell # common English misspellings in identifiers and comments
- dupword # duplicate words in comments and strings (the the, is is)
- predeclared # shadowing Go built-ins (len, cap, error)
- errname # error type/var naming conventions (ErrFoo, FooError)
- asciicheck # non-ASCII identifiers (prevents homoglyph/trojan source attacks)
# complexity
- gocyclo # cyclomatic complexity threshold
- nestif # deeply nested if/else chains
- funlen # function length limits (lines and statements)Next to this one in the catalogue, plus more from the same author.