7
7
@echo " Available commands"
8
8
@echo " help -- (default) print this message"
9
9
10
- ci : pre-commit $(call FORALL_PKGS,tests)
10
+ ci : ruff $(call FORALL_PKGS,tests)
11
11
help ::
12
12
@echo " ci -- Run tests for all packages, the same way as CI does"
13
13
14
- pre-commit :
15
- uv run pre-commit run --all-files
16
- help ::
17
- @echo " pre-commit -- Run pre-commit on all files"
18
-
19
14
clean : $(call FORALL_PKGS,clean)
20
15
rm -rf dist .ruff_cache .pytest_cache
21
16
help ::
@@ -36,6 +31,27 @@ help::
36
31
@echo " NOTE: run this command to ensure all containers are stopped after tests"
37
32
38
33
34
+ ruff :
35
+ @uv run ruff check --fix
36
+ @uv run ruff format
37
+ help ::
38
+ @echo " ruff -- Run ruff checks on all files."
39
+
40
+ define COMMITIZEN_HOOK_CONTENTS
41
+ # !/bin/sh
42
+ MSG_FILE=$$1
43
+ uv tool run --from commitizen cz check --allow-abort --commit-msg-file $$MSG_FILE
44
+ endef
45
+ export COMMITIZEN_HOOK_CONTENTS
46
+ install-hooks :
47
+ @echo " make ruff" > .git/hooks/pre-commit
48
+ @chmod +x .git/hooks/pre-commit
49
+ @echo " $$ COMMITIZEN_HOOK_CONTENTS" > .git/hooks/commit-msg
50
+ @chmod +x .git/hooks/commit-msg
51
+ help ::
52
+ @echo " install-hooks -- Install custom pre-commit hooks locally."
53
+ @echo " -- NOTE: Do this at least once after cloning the repo."
54
+
39
55
realtime.% :
40
56
@$(MAKE ) -C src/realtime $*
41
57
0 commit comments