Files
AndroidJava/PicQuery/scripts/pre-commit
T
coco 7846a45f2c a
2026-07-03 15:47:27 +08:00

23 lines
411 B
Bash

#!/bin/sh
echo "Running ktlint check..."
./gradlew ktlintCheck --daemon
RESULT=$?
if [ $RESULT -ne 0 ]; then
echo "ktlint check failed, please fix the above issues before committing"
exit 1
fi
echo "Running detekt..."
./gradlew detekt --daemon
RESULT=$?
if [ $RESULT -ne 0 ]; then
echo "detekt check failed, please fix the above issues before committing"
exit 1
fi
echo "All checks passed!"
exit 0