File tree 3 files changed +24
-6
lines changed
3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
echo " Running git pre-commit hook"
4
4
5
- ./gradlew formatKotlin
5
+ ./gradlew lintKotlin
6
6
7
7
status=$?
8
8
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
+
10
16
exit 0
Original file line number Diff line number Diff line change 2
2
3
3
echo " Running git pre-commit hook"
4
4
5
- ./gradlew formatKotlin
5
+ ./gradlew lintKotlin
6
6
7
7
status=$?
8
8
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
+
10
16
exit 0
Original file line number Diff line number Diff line change 2
2
3
3
echo " Running git pre-commit hook"
4
4
5
- ./gradlew formatKotlin
5
+ ./gradlew lintKotlin
6
6
7
7
status=$?
8
8
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
+
10
16
exit 0
You can’t perform that action at this time.
0 commit comments