Skip to content

fix(template): add ruff to default pre-commit hooks for Python repos - #564

Open
Moon-Knight13 wants to merge 1 commit into
mainfrom
fix/add-ruff-pre-commit-default
Open

Moon-Knight13 wants to merge 1 commit into
mainfrom
fix/add-ruff-pre-commit-default

Conversation

@Moon-Knight13

Copy link
Copy Markdown
Owner

Summary

  • Add ruff-pre-commit (v0.8.2) to .pre-commit-config.yaml with ruff --fix and ruff-format hooks
  • Positioned after semgrep and before local hooks so Python files are linted and formatted at commit time
  • Matches CI ruff expectations, preventing the recurring pattern of commits passing pre-commit locally but failing CI lint

Context

Fleet repos derived from this template run ruff in CI but not in pre-commit. This causes a recurring loop: commit passes local pre-commit → CI fails on ruff → developer has to amend. Adding ruff to default pre-commit hooks catches lint and format issues before push.

Test plan

  • pre-commit run --all-files — ruff and ruff-format hooks pass
  • CI checks pass

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Moon-Knight13
Moon-Knight13 force-pushed the fix/add-ruff-pre-commit-default branch from 2173807 to c03b1c5 Compare December 5, 2026 21:04
@Moon-Knight13

Copy link
Copy Markdown
Owner Author

🤖 PR Review Bot: Review findings below. CI status: ✅ all pass. Manual merge required.

Findings

No significant findings. Clean template update adding ruff hook configuration.

Range identifier check: ✅ Clean

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant