diff --git a/team-props/git-hooks/pre-commit.sh b/team-props/git-hooks/pre-commit.sh index 2e88dc812..eb4086362 100644 --- a/team-props/git-hooks/pre-commit.sh +++ b/team-props/git-hooks/pre-commit.sh @@ -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