-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 960 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 960 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: install-hooks lint lint-yaml format-check format-yaml clean help
SHELL := $(shell echo $$SHELL)
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install-hooks:
pre-commit install
lint: lint-yaml lint-python
lint-yaml:
yamllint .
lint-python: ## Lint Python code with ruff
ruff check .
ruff format --check .
format: ## Auto-format Python and YAML code
ruff check --fix .
ruff format .
pre-commit run yamlfmt --all-files || true
format-check: ## Check formatting without changes
ruff format --check .
ruff check .
yamlfmt --lint .
format-yaml:
pre-commit run yamlfmt --all-files || true
clean: ## Remove caches and temp files
find . -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true
find . -type d -name '.pytest_cache' -exec rm -rf {} + 2>/dev/null || true
rm -rf .ruff_cache
.DEFAULT_GOAL := help