mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-22 03:54:18 -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
|
||||
|
||||
echo "Running formatter..."
|
||||
# Format code using KtLint, analyze with KtLint & Lint
|
||||
echo "Running lint..."
|
||||
|
||||
./gradlew app:ktlintKiwixDebugFormat app:ktlintKiwixDebugCheck app:lintKiwixDebug --daemon
|
||||
./gradlew app:ktlintKiwixDebugCheck app:lintKiwixDebug --daemon
|
||||
|
||||
status=$?
|
||||
|
||||
@ -11,6 +10,7 @@ if [ "$status" = 0 ] ; then
|
||||
echo "Static analysis found no problems."
|
||||
exit 0
|
||||
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
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user