Skip to content

Commit 9dd6585

Browse files
author
Vincent Potucek
committed
PoC: Add rewrite support for errorprone.refasterrules
1 parent e1f4521 commit 9dd6585

File tree

54 files changed

+550
-946
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+550
-946
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
# --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
141141
# --no-scan: For public fork PRs, we won't attempt to publish the scan
142142
run: |
143-
./gradlew --build-cache --info $SCAN_ARG check releaseTarGz -x test
143+
./gradlew check rewriteDryRun --build-cache --info $SCAN_ARG releaseTarGz -x test
144144
- name: Archive check reports
145145
if: always()
146146
uses: actions/upload-artifact@v4

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,17 @@ For experiments (or regression testing purposes) add `-PcheckstyleVersion=X.y.z`
201201
#### Spotless ####
202202
The import order is a part of static check. please call `spotlessApply` to optimize the imports of Java codes before filing pull request.
203203

204-
./gradlew spotlessApply
204+
`./gradlew spotlessApply`
205+
206+
#### Rewrite
207+
The build system incorporates [Moderne](https://moderne.io/) rewrite capabilities for automated code transformations.
208+
209+
- **Convention** (e.g., JUnit's naming rules)
210+
- **Refactor** safely (e.g., rename methods, migrate APIs)
211+
- **Modernize** (e.g., Java 8 → Java 17 features)
212+
- **Patterns** (e.g., replace `Vector` with `ArrayList`)
213+
214+
`./gradlew rewriteRun`
205215

206216
#### Spotbugs ####
207217
Spotbugs uses static analysis to look for bugs in the code.

0 commit comments

Comments
 (0)