-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 909 Bytes
/
Copy pathMakefile
File metadata and controls
31 lines (24 loc) · 909 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
.PHONY: help fmt lint type test precommit install-hooks
help:
@echo "make fmt - format code (ruff format + prettier)"
@echo "make lint - lint code (ruff check + eslint)"
@echo "make type - type-check (mypy + vue-tsc)"
@echo "make test - run tests (pytest + vitest)"
@echo "make precommit - run pre-commit hooks on all files"
@echo "make install-hooks - install pre-commit and pre-push git hooks"
install-hooks:
pre-commit install --hook-type pre-commit --hook-type pre-push
fmt:
ruff format backend/app backend/tests cmk_plugins_23 tools
cd frontend && npm run format
lint:
ruff check backend/app backend/tests cmk_plugins_23 tools
cd frontend && npm run lint
type:
backend/.venv/bin/mypy backend/app upstream-checkmk/cmk
cd frontend && npm run type-check
test:
cd backend && pytest
cd frontend && npm test
precommit:
pre-commit run --all-files