Skip to content

Commit

Permalink
feat: add fmt githook
Browse files Browse the repository at this point in the history
  • Loading branch information
royalpinto007 committed Dec 29, 2023
1 parent 3bc9121 commit 67d2164
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contrib/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Run make fmt before committing
# Run make fmt
make fmt

# If make fmt fails, prevent the commit
if [ $? -ne 0 ]; then
echo "Error: make fmt failed. Please fix formatting issues before committing."
exit 1
fi

0 comments on commit 67d2164

Please sign in to comment.