Skip to content

Commit a94b357

Browse files
committed
Update README.md
Signed-off-by: yongjunhong <yongjunh@apache.org>
1 parent e7015df commit a94b357

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plugin-gradle/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,6 +1773,7 @@ spotless {
17731773
17741774
## Reviewdog integration for CI
17751775
1776+
**CURRENTLY IN BETA** – bug reports are welcome! This is a challenging feature to test comprehensively, so we anticipate needing a few releases to get everything right.
17761777
Spotless can generate reports compatible with [Reviewdog](https://github.com/reviewdog/reviewdog), a tool that automates code review tasks by posting formatting issues as comments on pull requests.
17771778
17781779
### Enabling Reviewdog integration
@@ -1792,14 +1793,18 @@ To generate reports when `spotlessCheck` fails:
17921793
```gradle
17931794
tasks.named('spotlessCheck').configure {
17941795
ignoreFailures = true
1795-
finalizedBy tasks.register('generateReviewdogReport') {
1796-
doLast {
1797-
if (spotlessCheck.outcome.failure) {
1798-
logger.lifecycle("Spotless check failed - Reviewdog report generated")
1796+
doLast {
1797+
if (state.failure != null) {
1798+
logger.lifecycle("Spotless check failed – generating Reviewdog report")
1799+
1800+
if (project.hasProperty('reviewdogOutput')) {
1801+
// Insert logic here to generate reviewdogOutput
1802+
// Example: file(project.reviewdogOutput).text = spotlessCheckOutput
17991803
}
18001804
}
18011805
}
18021806
}
1807+
18031808
```
18041809
18051810
For Reviewdog setup instructions, visit: https://github.com/reviewdog/reviewdog#installation

0 commit comments

Comments
 (0)