Skip to content

Commit

Permalink
Add precommit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
romeovs committed Nov 6, 2024
1 parent 3b7f4e6 commit 1cf3178
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,18 @@ MAKEFLAGS += -j4
endif

check: lint formatting typecheck


# Git hooks
.PHONY: run-always

.git/hooks/%: run-always
@echo "Creating $* hook"
@echo "make -j4 git.$*" > ".git/hooks/$*"
@chmod a+x ".git/hooks/$*"

.PHONY: hooks
hooks: .git/hooks/pre-commit .git/hooks/pre-push

git.pre-push: check
git.pre-commit: check

0 comments on commit 1cf3178

Please sign in to comment.