CICD-062 · Check Ruff formatting
Encyclopedia · Python CI and uv · All snippets
Previous · CICD-061 · Next · CICD-063
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites uv or Python dependencies pinned with fixture application and tests.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
uv run --locked ruff format --check src tests3. How it works
format --check verifies how Ruff would rewrite files. It leaves edits to the developer and gives CI a stable formatting gate.
4. Verify the result
CI prints offending files and leaves working tree unchanged.
Validation syntax-validated (Bash parse). Status definitions.