mirror of
https://github.com/nextcloud/android.git
synced 2024-11-21 20:55:31 +03:00
Update pre-commit hook to use spotless for kotlin
Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
0d646233b0
commit
b201b3a090
1 changed files with 3 additions and 3 deletions
|
@ -2,9 +2,9 @@
|
|||
# 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"
|
||||
if ! ./gradlew --daemon spotlessKotlinCheck &>/dev/null; then
|
||||
echo >&2 "ktlint failed! Run ./gradlew spotlessKotlinCheck for details"
|
||||
echo >&2 "Hint: fix most lint errors with ./gradlew spotlessKotlinApply"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue