Skip to content
Draft
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
11 changes: 7 additions & 4 deletions rewrite.yml → config/rewrite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ name: org.checkstyle.AllAutoFixes
displayName: Auto Fixes
description: List of auto fixes from different providers.
recipeList:
- org.checkstyle.autofix.CheckstyleAutoFix:
violationReportPath: "target/cs_errors.xml"
configurationPath: "config/checkstyle-checks.xml"
propertiesPath: "config/openrewrite-recipes-checkstyle.properties"
# - org.checkstyle.autofix.CheckstyleAutoFix:
# violationReportPath: "target/cs_errors.xml"
# configurationPath: "config/checkstyle-checks.xml"
# propertiesPath: "config/openrewrite-recipes-checkstyle.properties"
- org.openrewrite.java.RemoveUnusedImports
- org.openrewrite.staticanalysis.NoDoubleBraceInitialization
- org.openrewrite.java.testing.junit5.CleanupAssertions
# - org.openrewrite.java.testing.junit.JupiterBestPractices
- org.openrewrite.java.format.NormalizeFormat
- org.openrewrite.java.format.NormalizeLineBreaks
- org.openrewrite.java.format.RemoveTrailingWhitespace
Expand Down
110 changes: 65 additions & 45 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,10 @@
<version>3.1.0</version>
<configuration>
<java>
<endWithNewline />
<forbidWildcardImports />
<removeUnusedImports />
<trimTrailingWhitespace />
<importOrder>
<file>config/spotless/import.order</file>
</importOrder>
Expand All @@ -624,6 +626,64 @@
</upToDateChecking>
</configuration>
</plugin>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>6.26.0</version>
<configuration>
<configLocation>config/rewrite.yml</configLocation>
<exportDatatables>true</exportDatatables>
<skipMavenParsing>true</skipMavenParsing>
<activeRecipes>
<recipe>org.checkstyle.AllAutoFixes</recipe>
</activeRecipes>
<exclusions>
<exclusion>**.ci-temp**</exclusion>
<exclusion>**CheckstyleAntTask.java</exclusion>
<exclusion>**DesignForExtensionCheck.java</exclusion>
<exclusion>**HexLiteralCaseCheck.java</exclusion>
<exclusion>**NonEmptyAtclauseDescriptionCheckTest.java</exclusion>
<exclusion>**resources-noncompilable**</exclusion>
<exclusion>**src/it/resources**</exclusion>
<exclusion>**src/test/resources**</exclusion>
<exclusion>**xdocs-examples**</exclusion>
</exclusions>
<plainTextMasks>
<plainTextMask>**/*.groovy</plainTextMask>
<plainTextMask>**/*.xml</plainTextMask>
<plainTextMask>**/*.yml</plainTextMask>
<plainTextMask>**/resources-noncompilable/**</plainTextMask>
<plainTextMask>**/resources/**</plainTextMask>
</plainTextMasks>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle-openrewrite-recipes</artifactId>
<version>${checkstyle.openrewrite.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>3.22.0</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-rewrite</artifactId>
<version>0.17.0</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<version>3.24.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
Expand Down Expand Up @@ -784,6 +844,10 @@
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-metadata</artifactId>
Expand Down Expand Up @@ -1913,6 +1977,7 @@
<exclude>openrewrite-recipes-checkstyle.properties</exclude>
<exclude>org.eclipse.jdt.core.prefs</exclude>
<exclude>projects-to-test/**</exclude>
<exclude>rewrite.yml</exclude>
<exclude>signatures-test.txt</exclude>
<exclude>signatures.txt</exclude>
<exclude>spotless/import.order</exclude>
Expand Down Expand Up @@ -5446,54 +5511,9 @@
<id>checkstyle-autofix</id>
<build>
<plugins>
<!-- Checkstyle Autofix -->
<plugin>
<groupId>org.openrewrite.maven</groupId>
<artifactId>rewrite-maven-plugin</artifactId>
<version>6.26.0</version>
<configuration>
<exportDatatables>true</exportDatatables>
<skipMavenParsing>true</skipMavenParsing>
<activeRecipes>
<recipe>org.checkstyle.AllAutoFixes</recipe>
</activeRecipes>
<exclusions>
<exclusion>**.ci-temp**</exclusion>
<exclusion>**/resources-noncompilable/**</exclusion>
<exclusion>**src/it/resources**</exclusion>
<exclusion>**src/test/resources**</exclusion>
<exclusion>**xdocs-examples**</exclusion>
</exclusions>
<plainTextMasks>
<plainTextMask>**/*.xml</plainTextMask>
<plainTextMask>**/*.yml</plainTextMask>
<plainTextMask>**/*.groovy</plainTextMask>
<plainTextMask>**/resources/**</plainTextMask>
<plainTextMask>**/resources-noncompilable/**</plainTextMask>
</plainTextMasks>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle-openrewrite-recipes</artifactId>
<version>${checkstyle.openrewrite.version}</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-migrate-java</artifactId>
<version>3.22.0</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-static-analysis</artifactId>
<version>2.24.0</version>
</dependency>
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-rewrite</artifactId>
<version>0.17.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
Loading