-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 901 Bytes
/
Makefile
File metadata and controls
38 lines (30 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: check lint format test syntax all
# Run all checks (lint + syntax + tests)
all: check test
# Quick validation: lint + syntax check on all Python files
check: lint syntax
# Ruff lint (errors + warnings, no auto-fix)
lint:
@echo "=== Ruff Lint ==="
ruff check . --no-fix
# Ruff format check (reports unformatted files, doesn't modify)
format-check:
@echo "=== Ruff Format Check ==="
ruff format --check .
# Auto-fix: lint + format
fix:
ruff check . --fix
ruff format .
# Syntax check all root Python files
syntax:
@echo "=== Syntax Check ==="
@for f in *.py; do \
python3 -c "import py_compile; py_compile.compile('$$f', doraise=True)" && echo " $$f OK" || exit 1; \
done
@echo "All syntax checks passed"
# Run full test suite
test:
python3 -m pytest tests/ -x -q
# Run tests with coverage
test-cov:
python3 -m pytest tests/ -x -q --tb=short --co -q 2>/dev/null | tail -1