mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
#1307 improve dev flow of interacting with pre-commit hook
This commit is contained in:
parent
5756b3894a
commit
677cd2cdac
@ -1,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Running formatter..."
|
echo "Running lint..."
|
||||||
# Format code using KtLint, analyze with KtLint & Lint
|
|
||||||
|
|
||||||
./gradlew app:ktlintKiwixDebugFormat app:ktlintKiwixDebugCheck app:lintKiwixDebug --daemon
|
./gradlew app:ktlintKiwixDebugCheck app:lintKiwixDebug --daemon
|
||||||
|
|
||||||
status=$?
|
status=$?
|
||||||
|
|
||||||
@ -11,6 +10,7 @@ if [ "$status" = 0 ] ; then
|
|||||||
echo "Static analysis found no problems."
|
echo "Static analysis found no problems."
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
echo 1>&2 "Static analysis found violations it could not fix."
|
./gradlew app:ktlintKiwixDebugFormat --daemon
|
||||||
|
echo 1>&2 "Static analysis found violations and attempted to autofix, please commit these autoformat changes"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user