Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ format: format/sources format/json
test/styling: dependencies
$(GRADLE) --console=verbose clean checkstyleMain checkstyleTest


format/sources:
$(GRADLE) --console=verbose rewriteRun

format: format/sources

test/static: dependencies

## Unit tests and coverage
Expand Down
8 changes: 8 additions & 0 deletions algorithm-exercises-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
id 'checkstyle'
id 'org.openrewrite.rewrite' version '7.6.2'
id 'jacoco'
id 'org.barfuin.gradle.jacocolog' version '4.0.1'
id 'com.adarshr.test-logger' version '4.0.0'
Expand All @@ -35,6 +36,7 @@ dependencies {
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.21'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.21.0'

rewrite 'org.openrewrite.recipe:rewrite-static-analysis:latest.release'
}

application {
Expand All @@ -55,6 +57,12 @@ checkstyle {
showViolations = true
}

// Reference: https://docs.openrewrite.org/running-recipes/popular-recipe-guides/automatically-fix-checkstyle-violations
rewrite {
activeRecipe 'org.openrewrite.staticanalysis.CodeCleanup'
checkstyleConfigFile = file("checkstyle.xml")
}

configurations.checkstyle {
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") {
select("com.google.guava:guava:33.5.0-jre")
Expand Down
Loading