Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruff-format-diff check to display what the formatter changed #45

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ repos:
# Run the linter.
- id: ruff
args: [ --fix ]

# Show the diff of what would change.
- id: ruff-format
name: ruff-format-diff
args: [--diff]

# Run the formatter.
- id: ruff-format

- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v5.0.0"
hooks:
Expand All @@ -20,13 +27,15 @@ repos:
- id: "check-toml"
- id: "check-yaml"
- id: "check-merge-conflict"

- repo: https://github.com/packit/pre-commit-hooks
rev: v1.2.0
hooks:
- id: check-rebase
args:
- https://github.com/rhel-lightspeed/command-line-assistant.git
stages: [manual, pre-push]

- repo: https://github.com/gitleaks/gitleaks
rev: v8.21.2
hooks:
Expand Down