core: added formatter for changed file
This commit is contained in:
parent
0003c94632
commit
b1fc3e86a5
1 changed files with 14 additions and 0 deletions
14
Makefile
14
Makefile
|
|
@ -174,3 +174,17 @@ dev-srv:
|
|||
ruff-check:
|
||||
ruff check --ignore F401 --ignore I001 --ignore E402 --ignore E501 --ignore F841 --exclude rhodecode/lib/dbmigrate --exclude .eggs --exclude .dev .
|
||||
|
||||
.PHONY: ruff-format
|
||||
# Get changed Python files
|
||||
ruff-format:
|
||||
|
||||
@echo "Finding changed Python files..."
|
||||
@git diff --name-only | grep '\.py$$' > .changed_files || true
|
||||
@if [ -s .changed_files ]; then \
|
||||
echo "Running Ruff format on the following files:"; \
|
||||
cat .changed_files; \
|
||||
cat .changed_files | xargs ruff format; \
|
||||
else \
|
||||
echo "No Python files changed."; \
|
||||
fi
|
||||
@rm -f .changed_files
|
||||
Loading…
Add table
Add a link
Reference in a new issue