Skip to content

Commit

Permalink
ci: change pre commit fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
shouwn committed Sep 12, 2023
1 parent b68ff07 commit b63ac53
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .githook/pre-commit-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

echo "Running git pre-commit hook"

./gradlew formatKotlin
./gradlew lintKotlin

status=$?

[ $status -ne 0 ] && exit 1
if [ $status -ne 0 ]; then
echo "#######################################################"
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
echo "#######################################################"
exit 1
fi

exit 0
10 changes: 8 additions & 2 deletions .githook/pre-commit-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

echo "Running git pre-commit hook"

./gradlew formatKotlin
./gradlew lintKotlin

status=$?

[ $status -ne 0 ] && exit 1
if [ $status -ne 0 ]; then
echo "#######################################################"
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
echo "#######################################################"
exit 1
fi

exit 0
10 changes: 8 additions & 2 deletions .githook/pre-commit-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

echo "Running git pre-commit hook"

./gradlew formatKotlin
./gradlew lintKotlin

status=$?

[ $status -ne 0 ] && exit 1
if [ $status -ne 0 ]; then
echo "#######################################################"
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
echo "#######################################################"
exit 1
fi

exit 0

0 comments on commit b63ac53

Please sign in to comment.