-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51ebf91
commit 74eaa78
Showing
4 changed files
with
44 additions
and
14 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,22 @@ | ||
#!/bin/sh | ||
#husky 0.13.4 | ||
|
||
# This script runs ktlint check before pushing to the remote repository | ||
|
||
echo "Running ktlint check ..." | ||
./gradlew ktlintCheck 2> /dev/null | ||
EXIT_CODE=$? | ||
if [ $EXIT_CODE -ne 0 ]; then | ||
echo " " | ||
echo "*********************************************************************" | ||
echo "* " | ||
echo "* ktlint failed " | ||
echo "* " | ||
echo "* Please fix the issues above before pushing. " | ||
echo "* Usually running'ktlintFormat' fixes issues automatically. " | ||
echo "* ./gradlew ktlintFormat " | ||
echo "* " | ||
echo "*********************************************************************" | ||
echo " " | ||
exit $EXIT_CODE | ||
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
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