-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (43 loc) · 2.23 KB
/
Makefile
File metadata and controls
58 lines (43 loc) · 2.23 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Claude Code Notifier - Development Commands
.PHONY: help install format lint lint-fix typecheck test deadcode shell-lint check clean
help: ## Show this help
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
# ============================================================================
# QUALITY CHECK PATTERN
# ============================================================================
# Standard pattern: try quiet, show verbose on failure
define quality_check
@$(1) >/dev/null 2>&1 && echo "✅ $(2): PASSED" || (echo "❌ $(2): FAILED" && $(1) && false)
endef
# ============================================================================
# DEVELOPMENT
# ============================================================================
install: ## Install development dependencies
pip3 install -e ".[dev]"
format: ## Format code with ruff
$(call quality_check,ruff format *.py tests/,FORMAT)
lint: ## Lint with ruff (comprehensive check)
$(call quality_check,ruff check *.py tests/,LINT)
lint-fix: ## Auto-fix linting issues with ruff
$(call quality_check,ruff check *.py tests/ --fix,LINT-FIX)
typecheck: ## Type check with mypy
$(call quality_check,mypy *.py,TYPECHECK)
test: ## Run tests
@pytest -s && echo "✅ TEST: PASSED" || (echo "❌ TEST: FAILED" && false)
deadcode: ## Find dead/unused code with vulture
$(call quality_check,vulture *.py tests/ --min-confidence 70,DEADCODE)
shell-lint: ## Lint shell scripts (preserved from original)
@echo "🐚 Linting shell scripts..."
@shellcheck --severity=info --enable=all *.sh mobile/*.sh && echo "✅ Shell lint: PASSED" || (echo "❌ Shell lint: FAILED" && false)
check: ## Run comprehensive quality checks
@echo "🔍 Running comprehensive quality checks..."
@$(MAKE) -k format lint typecheck test deadcode shell-lint && echo "\n🎉 CHECK PASSED" || echo "\n❌ CHECK FAILED"
clean: ## Clean up temporary files
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
rm -rf .pytest_cache .ruff_cache .mypy_cache
find . -name "*.log" -delete
find . -name "*~" -delete
find . -name "*.tmp" -delete
@echo "✅ Cleaned temporary files"