Files
KeyPass/githooks/pre-commit
Yogesh Choudhary Paliyal 065378adfc Pre commit hook Add (#600)
* added commands

* command line improvements

* remove unwanted changes
2023-06-03 13:30:17 +05:30

17 lines
345 B
Bash
Executable File

#!/bin/sh
set -e
echo "*******************************"
echo "Running git pre-commit hook"
echo "*******************************"
# Run Spotless
./gradlew spotlessApply
./gradlew spotlessKotlinApply
# Check if lint found any errors
if [[ $? -ne 0 ]]; then
echo "Spotless found some errors. Please fix them before committing."
exit 1
fi