Sean Mac Gillicuddy 80c3276786 Add detekt
2019-12-11 14:44:26 +00:00

18 lines
490 B
Bash

#!/bin/sh
echo "Running lint..."
./gradlew ktlintCheck detekt app:lintDebug core:lintDebug custom:lintCustomexampleDebug --daemon
status=$?
if [ "$status" = 0 ] ; then
echo "Static analysis found no problems."
exit 0
else
./gradlew ktlintFormat --daemon
echo 1>&2 "Static analysis found violations and attempted to autofix, please commit these autoformat changes"
echo "If the build failed for another reason please make sure JAVA_HOME is set to JDK8"
exit 1
fi