# Ruff

Keep Python lint findings out of changes

Catch undefined names, unused imports and other selected errors across Python modules. Commit the rule selection in pyproject.toml so editors and CI agree.

Category: Code quality
Languages: Python

## Standard evidence

Rubric v1 · 7/8 verified · 1 unknown · 0 contrary · reviewed 2026-11-28

- **Definition** (verified) — Ruff's selection and ignore lists determine the active Python lint rules. The documented default selects Pyflakes and a subset of pycodestyle. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/linter/)
- **Measurement** (verified) — Ruff check reports violations for the configured paths and selection. Its default exit status distinguishes findings from abnormal termination. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/linter/)
- **Conformance** (verified) — The worked fixture includes an unused os import, its expected F401 location and the clean result after the import is removed. This checks one default lint rule. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/tutorial/)
- **CI enforcement** (verified) — The GitHub Actions and GitLab examples invoke ruff check on the checkout. The lint step can fail the pipeline while making its diagnostics available to developers. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/integrations/)
- **Getting started** (verified) — Ruff's tutorial installs the tool, creates an example Python project and shows ruff check producing F401 for a specific unused import. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/tutorial/)
- **Real-world adoption** (verified) — pandas pins Ruff's pre-commit integration and configures ruff-check hooks. This demonstrates a downstream project running the lint check on contributions. Reviewed 2026-11-28. [Source](https://github.com/pandas-dev/pandas/blob/main/.pre-commit-config.yaml)
- **Agent guidance** (verified) — For the tutorial module, run ruff check and inspect its F401 location. Remove the unused import or apply the safe fix, then rerun and confirm that this specific finding disappears. Reviewed 2026-11-28. [Source](https://docs.astral.sh/ruff/tutorial/)
- **Agent portability** (unknown) — No reviewed evidence is recorded for this dimension.

## Adoption

Use Ruff in this repository to meet this standard: Keep Python lint findings out of changes. Catch undefined names, unused imports and other selected errors across Python modules. Commit the rule selection in pyproject.toml so editors and CI agree. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.

### Tool command

```
ruff check .
```

### Seikika package

[sarif (Seikika kit)](https://github.com/seikika/seikika/tree/89eb0a2fcd2ffe67151df43f2a062ebc8a1e497c/packages/sarif)

Add github:seikika/seikika/packages/sarif@89eb0a2fcd2ffe67151df43f2a062ebc8a1e497c to the include list in .seikika/seikika.yaml. Copy the Ruff include parameters from the SARIF package guide and set files to your Python source globs. Run seikika install .seikika from the checkout root.

## References

- [Tool documentation](https://docs.astral.sh/ruff/)
- [Agent skill](/skills/ruff/SKILL.md)
