GS/BS
← Standards directory
Code quality

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.

Python

Community rubric · v1

The evidence

Evidence coverage7 / 8
7 supported · 1 unresolved

One point for each verified check. Unknown means we still need evidence. Contrary evidence records an observed result that goes against the criterion.

Latest evidence review ·

  • Definition

    Verified

    Ruff's selection and ignore lists determine the active Python lint rules. The documented default selects Pyflakes and a subset of pycodestyle.

    Upstream documentation ↗
  • Measurement

    Verified

    Ruff check reports violations for the configured paths and selection. Its default exit status distinguishes findings from abnormal termination.

    Upstream documentation ↗
  • Conformance

    Verified

    The catalog ran Ruff 0.14.0 on two otherwise identical functions with only F821 enabled. The valid parameter read exited 0. Its misspelling exited 1 with the expected undefined-name diagnostic.

    Fixture replay ↗
  • 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.

    Upstream documentation ↗
  • 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.

    Upstream documentation ↗
  • 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.

    Downstream configuration ↗
  • 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.

    Cited source ↗
  • Agent portability

    Unknown

    No reviewed evidence is recorded for this dimension.

    Does the practice work in two agent harnesses? Contribute evidence ↗

Use this standard

Run the check with the tool installed and configured for your project.

ruff check .

Agent prompt

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.
Read the agent skill ↗

Optional Seikika integration

sarif (Seikika kit) ↗

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.

Primary source

Ruff documentation ↗