File tree Expand file tree Collapse file tree 2 files changed +1
-31
lines changed
Expand file tree Collapse file tree 2 files changed +1
-31
lines changed Original file line number Diff line number Diff line change 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'
Original file line number Diff line number Diff line change @@ -16,33 +16,3 @@ dependencyResolutionManagement {
1616rootProject.name = " WaiterRobot"
1717include(" :androidApp" )
1818include(" :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- }
You can’t perform that action at this time.
0 commit comments