Skip to content

Commit b63ac53

Browse files
committed
ci: change pre commit fail message
1 parent b68ff07 commit b63ac53

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

.githook/pre-commit-default.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
echo "Running git pre-commit hook"
44

5-
./gradlew formatKotlin
5+
./gradlew lintKotlin
66

77
status=$?
88

9-
[ $status -ne 0 ] && exit 1
9+
if [ $status -ne 0 ]; then
10+
echo "#######################################################"
11+
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
12+
echo "#######################################################"
13+
exit 1
14+
fi
15+
1016
exit 0

.githook/pre-commit-macos.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
echo "Running git pre-commit hook"
44

5-
./gradlew formatKotlin
5+
./gradlew lintKotlin
66

77
status=$?
88

9-
[ $status -ne 0 ] && exit 1
9+
if [ $status -ne 0 ]; then
10+
echo "#######################################################"
11+
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
12+
echo "#######################################################"
13+
exit 1
14+
fi
15+
1016
exit 0

.githook/pre-commit-windows.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22

33
echo "Running git pre-commit hook"
44

5-
./gradlew formatKotlin
5+
./gradlew lintKotlin
66

77
status=$?
88

9-
[ $status -ne 0 ] && exit 1
9+
if [ $status -ne 0 ]; then
10+
echo "#######################################################"
11+
echo "#Lint failed, commit aborted. Please run formatKotlin.#"
12+
echo "#######################################################"
13+
exit 1
14+
fi
15+
1016
exit 0

0 commit comments

Comments
 (0)