Skip to content

Commit 6e6bce0

Browse files
committed
Remove detekt push hook
1 parent 742b916 commit 6e6bce0

File tree

2 files changed

+1
-31
lines changed

2 files changed

+1
-31
lines changed

.github/workflows/checkStyle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: ./gradlew detekt
3333

3434
- name: Upload detekt SARIF files
35-
if: always()
35+
if: success() || failure()
3636
uses: github/codeql-action/upload-sarif@v2
3737
with:
3838
sarif_file: 'build/reports/detekt/merge.sarif'

settings.gradle.kts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,3 @@ dependencyResolutionManagement {
1616
rootProject.name = "WaiterRobot"
1717
include(":androidApp")
1818
include(":shared")
19-
20-
plugins {
21-
id("org.danilopianini.gradle-pre-commit-git-hooks") version "1.1.9"
22-
}
23-
24-
gitHooks {
25-
hook("pre-push") {
26-
from {
27-
"""
28-
echo "Running detekt check..."
29-
OUTPUT="/tmp/detekt-${'$'}(date +%s)"
30-
./gradlew detekt > ${'$'}OUTPUT
31-
EXIT_CODE=${'$'}?
32-
if [ ${'$'}EXIT_CODE -ne 0 ]; then
33-
cat ${'$'}OUTPUT
34-
rm ${'$'}OUTPUT
35-
echo "**********************************************************************************************"
36-
echo " detekt failed "
37-
echo " Please fix the above issues before pushing. "
38-
echo " Some of the issues might already be resolved automatically and only must be committed again. "
39-
echo " Run './gradlew detekt' to to get an updated list of issues. "
40-
echo "**********************************************************************************************"
41-
exit ${'$'}EXIT_CODE
42-
fi
43-
rm ${'$'}OUTPUT
44-
""".trimIndent()
45-
}
46-
}
47-
createHooks(overwriteExisting = true)
48-
}

0 commit comments

Comments
 (0)