mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-18 21:18:15 +00:00
631c13df5e
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
15 lines
515 B
Bash
Executable File
15 lines
515 B
Bash
Executable File
#!/bin/bash
|
|
# Pre-commit hook: don't allow commits if detekt or ktlint fail. Skip with "git commit --no-verify".
|
|
echo "Running pre-commit checks..."
|
|
|
|
if ! ./gradlew --daemon ktlintCheck &>/dev/null; then
|
|
echo >&2 "ktlint failed! Run ./gradlew ktlintCheck for details"
|
|
echo >&2 "Hint: fix most lint errors with ./gradlew ktlintFormat"
|
|
exit 1
|
|
fi
|
|
|
|
if ! ./gradlew --daemon detekt &>/dev/null; then
|
|
echo >&2 "Detekt failed! See report at file://$(pwd)/app/build/reports/detekt/detekt.html"
|
|
exit 1
|
|
fi
|