Linting with Ruff (Fast and Modern)
On this page
Why Ruff
Linting prevents common bugs and keeps style consistent. Ruff is fast enough to run on every commit and in CI.
What Linting Catches
- Unused imports and variables
- Shadowing and risky patterns
- Complexity smells and unsafe constructs
Operational Checklist
- Run Ruff in CI and pre-commit hooks.
- Keep rules consistent across the repo.
- Prefer auto-fix where safe, review changes for behavior impact.
Failure Modes
- Rule churn: constantly changing lint rules creates friction.
- Ignoring warnings: teams learn to bypass lint instead of fixing causes.