Skip to content

Commit f453dce

Browse files
authored
chore(CI): drop pre-commit (#1238)
1 parent 8b4b56c commit f453dce

File tree

3 files changed

+23
-35
lines changed

3 files changed

+23
-35
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

Makefile

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ help::
77
@echo "Available commands"
88
@echo " help -- (default) print this message"
99

10-
ci: pre-commit $(call FORALL_PKGS,tests)
10+
ci: ruff $(call FORALL_PKGS,tests)
1111
help::
1212
@echo " ci -- Run tests for all packages, the same way as CI does"
1313

14-
pre-commit:
15-
uv run pre-commit run --all-files
16-
help::
17-
@echo " pre-commit -- Run pre-commit on all files"
18-
1914
clean: $(call FORALL_PKGS,clean)
2015
rm -rf dist .ruff_cache .pytest_cache
2116
help::
@@ -36,6 +31,27 @@ help::
3631
@echo " NOTE: run this command to ensure all containers are stopped after tests"
3732

3833

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+
3955
realtime.%:
4056
@$(MAKE) -C src/realtime $*
4157

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ To run each of the packages' tests in parallel. This should be generally faster
6969

7070
Other relevant commands include
7171
```bash
72-
make pre-commit # run lints and formmating before commiting
72+
make install-hooks # install all commit hooks into the local .git folder
7373
make stop-infra # stops all running containers from all packages
7474
make clean # delete all intermediary files created by testing
7575
```

0 commit comments

Comments
 (0)