File tree 2 files changed +14
-0
lines changed
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ lint: lint/markdown lint/yaml test/styling test/static
60
60
test/styling : dependencies
61
61
$(GRADLE ) --console=verbose clean checkstyleMain checkstyleTest
62
62
63
+
64
+ format/sources :
65
+ $(GRADLE ) --console=verbose rewriteRun
66
+
67
+ format : format/sources
68
+
63
69
test/static : dependencies
64
70
65
71
test : env
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ plugins {
10
10
// Apply the application plugin to add support for building a CLI application in Java.
11
11
id ' application'
12
12
id ' checkstyle'
13
+ id ' org.openrewrite.rewrite' version ' 7.6.2'
13
14
id ' jacoco'
14
15
id ' org.barfuin.gradle.jacocolog' version ' 3.1.0'
15
16
id ' com.adarshr.test-logger' version ' 4.0.0'
@@ -35,6 +36,7 @@ dependencies {
35
36
implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-annotations' , version : ' 2.19.0'
36
37
implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : ' 2.19.0'
37
38
39
+ rewrite ' org.openrewrite.recipe:rewrite-static-analysis:latest.release'
38
40
}
39
41
40
42
application {
@@ -55,6 +57,12 @@ checkstyle {
55
57
showViolations = true
56
58
}
57
59
60
+ // Reference: https://docs.openrewrite.org/running-recipes/popular-recipe-guides/automatically-fix-checkstyle-violations
61
+ rewrite {
62
+ activeRecipe ' org.openrewrite.staticanalysis.CodeCleanup'
63
+ checkstyleConfigFile = file(" checkstyle.xml" )
64
+ }
65
+
58
66
configurations. checkstyle {
59
67
resolutionStrategy. capabilitiesResolution. withCapability(" com.google.collections:google-collections" ) {
60
68
select(" com.google.guava:guava:33.4.8-jre" )
You can’t perform that action at this time.
0 commit comments