Skip to content

Commit ea0e1b3

Browse files
authored
ci: Auto-suggest code fixes in PRs (#76)
1 parent 063bf3d commit ea0e1b3

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build_and_test.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ jobs:
2121
distribution: temurin
2222
java-version: 11
2323
- uses: gradle/gradle-build-action@v2
24+
name: build and test
2425
with:
25-
arguments: check build -PdetektAutoCorrect=false --scan
26-
gradle-version: wrapper
26+
arguments: check build -x detekt -Pdetekt.multiplatform.disabled=true --scan
27+
gradle-version: wrapper
2728
dependency-graph: generate-and-submit
2829
- name: Upload test reports
2930
if: ${{ failure() }} # runs only if previous step has failed, the entire workflow will still be marked as failed
@@ -36,3 +37,16 @@ jobs:
3637
with:
3738
flags: unittests
3839
fail_ci_if_error: true # optional (default = false)
40+
41+
- uses: gradle/gradle-build-action@v2
42+
name: run detekt
43+
with:
44+
arguments: check -Pdetekt.multiplatform.disabled=false -PdetektAutoCorrect=true
45+
gradle-version: wrapper
46+
- run: git status && git diff
47+
if: ${{ always() }}
48+
- uses: reviewdog/action-suggester@v1
49+
# Fixme: run if only the previous step has failed
50+
if: ${{ failure() }}
51+
with:
52+
tool_name: detekt

0 commit comments

Comments
 (0)