forked from matter-labs/zksync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new pre-push hook to run zk fmt check
- Loading branch information
1 parent
8eac414
commit 55e2445
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# | ||
# Pre-push hook verifying that inappropriate code will not be pushed. | ||
|
||
# Colors for the terminal output | ||
RED='\033[0;31m' | ||
NC='\033[0m' # No Color | ||
|
||
# Check that prettier formatting rules are not violated. | ||
if ! zk fmt --check; then | ||
echo -e "${RED}Commit error!${NC}" | ||
echo "Please format the code via 'zk fmt', cannot push unformatted code" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters