Pylint
$ pylint Foundation Low RiskComprehensive PyCQA Python analyzer checking bug patterns, unused imports, code smells, and naming conventions. Supports machine-readable --output-format=json (and json2) as well as --errors-only (-E) to cut noise in agent loops.
brew install pylint Runs local Python AST analysis directly on workspace files without needing MCP.
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
Supports --output-format=json / json2 and --errors-only, though bitmask exit codes (1/2/4/8/16/32) can surprise naive callers.
--output-format=jsonoutputs clean structured findings- Bitmask exit code returns non-zero even on minor convention warnings unless
--fail-underis tuned
Read-only static analyzer; can load C-extension metadata if --extension-pkg-allow-list is set, otherwise AST-only.
- Read-only analysis with zero file writes
Available via Homebrew, PyPI, and uvx, though import resolution requires running inside the project's environment.
- Needs project virtualenv dependencies to avoid
import-errorfalse positives
Deep structural checks, but noticeably slow and noisy on large repos unless tuned via .pylintrc.
- High rule verbosity and slower execution compared to
ruff
Maintained by pylint-dev/pylint under PyCQA stewardship.
- Active
pylint-dev/pylintmaintenance under GPL-2.0
Extensive ReadTheDocs reference for every message ID and CLI option.
- Official docs at pylint.readthedocs.io
Security, Auth & Guardrails
Offline local Python analyzer; no credentials stored or required.
GPL-2.0 open-source Python package; completely free.
# Pylint (pylint) Agent Rules - Always pass `--output-format=json` (or `json2`) and `--score=n` to avoid ASCII score tables. - Start with `--errors-only` (`-E`) on unconfigured repos to avoid drowning context in style/refactoring warnings.
Agent-Ready Command Recipes
Safe Read-Only Queries
pylint --errors-only --output-format=json src/
Filters to high-severity error codes (-E) and emits structured JSON findings without modifying files.
pylint --output-format=json2 --score=n src/
Outputs structured json2 messages plus statistics without human rating banners.
Strengths for Agents
- +
--output-format=jsonandjson2provide structured message IDs, symbols, and spans. - +
--errors-onlyisolates real bugs while suppressing stylistic noise.
Caveats & Pitfalls
- ! Slow execution and verbose default convention/refactor warnings without a tuned
.pylintrc. - ! Bitmask exit codes fail CI/agent scripts on minor style notices unless
--exit-zeroor--fail-underis configured.