Skip to content

Commit 3f510a2

Browse files
author
Gonzalo Diaz
committed
[CONFIG] auto fix format sources capacity added. Makefile action "format" added.
1 parent f88a1ba commit 3f510a2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ lint: lint/markdown lint/yaml test/styling test/static
6060
test/styling: dependencies
6161
$(GRADLE) --console=verbose clean checkstyleMain checkstyleTest
6262

63+
64+
format/sources:
65+
$(GRADLE) --console=verbose rewriteRun
66+
67+
format: format/sources
68+
6369
test/static: dependencies
6470

6571
test: env

algorithm-exercises-java/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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 '3.1.0'
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.19.0'
3637
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.19.0'
3738

39+
rewrite 'org.openrewrite.recipe:rewrite-static-analysis:latest.release'
3840
}
3941

4042
application {
@@ -55,6 +57,11 @@ checkstyle {
5557
showViolations = true
5658
}
5759

60+
rewrite {
61+
activeRecipe 'org.openrewrite.staticanalysis.CodeCleanup'
62+
checkstyleConfigFile = file("checkstyle.xml")
63+
}
64+
5865
configurations.checkstyle {
5966
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
6067
select("com.google.guava:guava:33.4.8-jre")

0 commit comments

Comments
 (0)