-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpre-commit
More file actions
21 lines (18 loc) · 761 Bytes
/
pre-commit
File metadata and controls
21 lines (18 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
echo "*********************************************************"
echo "Running git pre-commit hook. Running Static analysis... "
echo "*********************************************************"
./gradlew ktlintCheck
status=$?
if [ "$status" = 0 ] ; then
echo "Static analysis found no problems."
exit 0
else
echo "*********************************************************"
echo " ******************************************** "
echo 1>&2 "Static analysis found violations it could not fix."
echo "Run ./gradlew ktlintFormat to fix formatting related issues..."
echo " ******************************************** "
echo "*********************************************************"
exit 1
fi