Skip to content

Commit

Permalink
githooks
Browse files Browse the repository at this point in the history
  • Loading branch information
nenadnoveljic committed Jun 26, 2024
1 parent 39f669a commit e8008cf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'

if ! ./gradlew spotlessCheck; then
./gradlew spotlessApply
echo ""
echo ""
echo -e "\033[0;33mCode has been formatted; please git diff/add and recommit."
echo ""
echo ""
exit 1
fi

# Run Groovy code check
./gradlew codenarcTest -PskipTests

0 comments on commit e8008cf

Please sign in to comment.