Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

golangci-lint

$ golangci-lint Community Low Risk
golangci · Code & DevOps · GPL-3.0 · macos / linux / windows

Go 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.

FCRS-1.0 Score
89 /100
Good
Medium Confidence
Zero-Friction Install
brew install golangci-lint
CLI vs MCP Decision CLI Only

Local Go compiler/AST analyzer running directly in the module workspace; CLI JSON output is standard and fast.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

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=stdout in v2)
  • Supports --color=never and --max-issues-per-linter
Trust & Safety 23 / 25

Strictly read-only by default; only writes source files when --fix is explicitly passed.

  • Read-only analysis unless --fix is specified
Setup & Portability 14 / 15

Single binary across macOS, Linux, and Windows; requires matching Go SDK version to load target modules.

  • Requires Go toolchain matching project go.mod
Utility & Efficiency 14 / 15

Shares Go package type-checking across dozens of linters, cutting CI and agent verification time dramatically.

  • Unified parallel runner for 50+ Go linters
Maintenance & Lineage 9 / 10

De facto Go community standard (golangci/golangci-lint) under GPL-3.0.

  • Active community project with wide Go ecosystem adoption
Docs & Verifiability 8 / 10

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

Auth Modes
No Auth
Credential Storage

Purely local Go source analysis; no credentials stored or required.

Side Effects
Read-Only Local Write
Cost & Quotas

GPL-3.0 open-source Go binary; free to use.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Run configured Go linters with JSON output (v2)
golangci-lint run --output.json.path=stdout ./...

Runs project linters across all packages without modifying files and emits structured JSON issues to stdout.

Inspect active linters and configuration
golangci-lint linters

Lists enabled and disabled analyzers for the current .golangci.yml configuration.

Controlled Writes & Previews

Apply safe auto-fixes supported by enabled linters
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; --fix opts 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.mod toolchain.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI