File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,12 @@ format: format/sources format/json
9494test/styling : dependencies
9595 $(GRADLE ) --console=verbose clean checkstyleMain checkstyleTest
9696
97+
98+ format/sources :
99+ $(GRADLE ) --console=verbose rewriteRun
100+
101+ format : format/sources
102+
97103test/static : dependencies
98104
99105# # Unit tests and coverage
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ plugins {
1010 // Apply the application plugin to add support for building a CLI application in Java.
1111 id ' application'
1212 id ' checkstyle'
13+ id ' org.openrewrite.rewrite' version ' 7.6.2'
1314 id ' jacoco'
1415 id ' org.barfuin.gradle.jacocolog' version ' 4.0.1'
1516 id ' com.adarshr.test-logger' version ' 4.0.0'
@@ -35,6 +36,7 @@ dependencies {
3536 implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-annotations' , version : ' 2.21'
3637 implementation group : ' com.fasterxml.jackson.core' , name : ' jackson-databind' , version : ' 2.21.0'
3738
39+ rewrite ' org.openrewrite.recipe:rewrite-static-analysis:latest.release'
3840}
3941
4042application {
@@ -55,6 +57,12 @@ checkstyle {
5557 showViolations = true
5658}
5759
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+
5866configurations. checkstyle {
5967 resolutionStrategy. capabilitiesResolution. withCapability(" com.google.collections:google-collections" ) {
6068 select(" com.google.guava:guava:33.5.0-jre" )
You can’t perform that action at this time.
0 commit comments