golangci-lint
$ golangci-lint Community Low RiskGo ecosystem meta-linter executing dozens of static analyzers in parallel while sharing type-checking and AST loading work. Supports structured JSON output via --output.json.path=stdout (v2) or --out-format=json (v1), read-only checks by default, and optional --fix.
brew install golangci-lint Local Go compiler/AST analyzer running directly in the module workspace; CLI JSON output is standard and fast.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Native JSON diagnostic output, --color=never, --issues-exit-code, and deterministic headless execution, though CLI flags changed between v1 (--out-format=json) and v2 (--output.json.path=stdout).
- Supports structured JSON diagnostics (
--output.json.path=stdoutin v2) - Supports
--color=neverand--max-issues-per-linter
Strictly read-only by default; only writes source files when --fix is explicitly passed.
- Read-only analysis unless
--fixis specified
Single binary across macOS, Linux, and Windows; requires matching Go SDK version to load target modules.
- Requires Go toolchain matching project
go.mod
Shares Go package type-checking across dozens of linters, cutting CI and agent verification time dramatically.
- Unified parallel runner for 50+ Go linters
De facto Go community standard (golangci/golangci-lint) under GPL-3.0.
- Active community project with wide Go ecosystem adoption
Detailed docs at golangci-lint.run covering v1-to-v2 migration, linters, and CLI options.
- Official docs site at golangci-lint.run
Security, Auth & Guardrails
Purely local Go source analysis; no credentials stored or required.
GPL-3.0 open-source Go binary; free to use.
# golangci-lint Agent Rules - Check `golangci-lint version` before passing output flags: v2 uses `--output.json.path=stdout`, whereas v1 used `--out-format=json`. - Run without `--fix` first to inspect diagnostics cleanly.
Agent-Ready Command Recipes
Safe Read-Only Queries
golangci-lint run --output.json.path=stdout ./...
Runs project linters across all packages without modifying files and emits structured JSON issues to stdout.
golangci-lint linters
Lists enabled and disabled analyzers for the current .golangci.yml configuration.
Controlled Writes & Previews
golangci-lint run --fix ./...
Automatically applies fixer patches for supported linters in place.
Strengths for Agents
- + Parallel shared-AST execution runs dozens of Go analyzers in a single pass with JSON output.
- + Read-only by default;
--fixopts into automated edits.
Caveats & Pitfalls
- ! Breaking flag syntax change between v1 (
--out-format=json) and v2 (--output.json.path=stdout); check binary version first. - ! Must be compiled with a Go version >= the repository's
go.modtoolchain.