Skip to content

Commit

Permalink
Add pre-commit hook target
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Dec 22, 2024
1 parent 49f294c commit 324deb6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ lint: .pre-commit-config.yaml
golangci-lint: .golangci.yaml
golangci-lint run --fix --timeout=5m

## .git/hooks/pre-commit: Install the pre-commit hook
.git/hooks/pre-commit:
@printf "#!/bin/sh\nmake lint\n" > $@
@chmod +x $@

.PHONY: clean
clean:
rm -rf $(DST_DIR)

0 comments on commit 324deb6

Please sign in to comment.