-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (36 loc) · 1.12 KB
/
Makefile
File metadata and controls
44 lines (36 loc) · 1.12 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
# Makefile for code quality and formatting
# Define color codes
RED := \033[0;31m
GREEN := \033[0;32m
YELLOW := \033[1;33m
NC := \033[0m # No Color
# Default target - run both lint and test
all: lint test
# Run tests
# TODO
# Run both linting and formatting in one command
lint: ruff-lint format eslint
# Run ESLint on frontend code
eslint:
cd frontend && npm run lint
# Run linting checks and fix issues automatically
ruff-lint:
ruff check --fix
# Format code according to project standards
format:
ruff format
# CI/CD version of lint that only checks but doesn't modify files
# Used in CI pipelines to verify code quality without making changes
lint-cicd:
@echo "Running code quality checks..."
@if ! ruff check; then \
echo -e "$(RED)ERROR: Ruff linting failed!$(NC)"; \
echo -e "$(YELLOW)Please run 'make ruff-lint' locally to fix these issues.$(NC)"; \
exit 1; \
fi
@if ! ruff format --check; then \
echo -e "$(RED)ERROR: Code formatting check failed!$(NC)"; \
echo -e "$(YELLOW)Please run 'make format' locally to fix these issues.$(NC)"; \
exit 1; \
fi
@echo -e "$(GREEN)All code quality checks passed!$(NC)"