ci: improve pre-commit error reporting
In the CI, enable --show-diff-on-failure
, to show the generated diff by the hooks on errors.
In pre-commit, enable --show-fixes
in ruff's linter to summarize the applied fixes by files.
✗ pre-commit run --all-files --show-diff-on-failure
ruff.....................................................................Failed
- hook id: ruff
- files were modified by this hook
Fixed 1 error:
- cerbero/main.py:
1 × F401 (unused-import)
Found 1 error (1 fixed, 0 remaining).
ruff-format..............................................................Passed
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/cerbero/main.py b/cerbero/main.py
index d72151d4..e79c1b14 100644
--- a/cerbero/main.py
+++ b/cerbero/main.py
@@ -16,7 +16,6 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-from cerbero import hacks # noqa: F401
import argparse
import sys
Edited by Andoni Morales Alastruey