Skip to content

Commit

Permalink
Add ruff-format-diff check to display what the formatter changed (#45)
Browse files Browse the repository at this point in the history
This is helpful when CI is failing to see what is causing the error.
  • Loading branch information
samdoran authored Nov 20, 2024
1 parent 857f1fe commit 81689b5
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 81689b5

Please sign in to comment.