Spaces:
Sleeping
Sleeping
Alina Lozovskaya
commited on
Commit
·
4dc9a10
1
Parent(s):
bc8d2bf
Add Makefile
Browse files
Makefile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.PHONY: style format quality check all
|
2 |
+
|
3 |
+
# Applies code style fixes to the specified file or directory
|
4 |
+
style:
|
5 |
+
@echo "Applying style fixes to $(file)"
|
6 |
+
ruff format $(file)
|
7 |
+
ruff check --fix $(file)
|
8 |
+
|
9 |
+
# Checks code quality for the specified file or directory without applying fixes
|
10 |
+
check:
|
11 |
+
@echo "Checking code quality for $(file) without fixes"
|
12 |
+
ruff format --diff $(file)
|
13 |
+
ruff check $(file)
|
14 |
+
|
15 |
+
# Applies PEP8 formatting and checks the entire codebase
|
16 |
+
all: style
|
17 |
+
@echo "Formatting and checking the entire codebase"
|
18 |
+
$(MAKE) style file=.
|
19 |
+
|
20 |
+
# Checks the entire codebase without applying fixes (for CI)
|
21 |
+
quality: check
|
22 |
+
@echo "Checking quality of the entire codebase without fixes"
|
23 |
+
$(MAKE) check file=.
|