Skip to content

PoC: Add rewrite support for errorprone.refasterrules #20219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
# --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
# --no-scan: For public fork PRs, we won't attempt to publish the scan
run: |
./gradlew --build-cache --info $SCAN_ARG check releaseTarGz -x test
./gradlew check rewriteDryRun --build-cache --info $SCAN_ARG releaseTarGz -x test
- name: Archive check reports
if: always()
uses: actions/upload-artifact@v4
Expand Down
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,17 @@ For experiments (or regression testing purposes) add `-PcheckstyleVersion=X.y.z`
#### Spotless ####
The import order is a part of static check. please call `spotlessApply` to optimize the imports of Java codes before filing pull request.

./gradlew spotlessApply
`./gradlew spotlessApply`

#### Rewrite
The build system incorporates [Moderne](https://moderne.io/) rewrite capabilities for automated code transformations.

- **Convention** (e.g., JUnit's naming rules)
- **Refactor** safely (e.g., rename methods, migrate APIs)
- **Modernize** (e.g., Java 8 → Java 17 features)
- **Patterns** (e.g., replace `Vector` with `ArrayList`)

`./gradlew rewriteRun`

#### Spotbugs ####
Spotbugs uses static analysis to look for bugs in the code.
Expand Down
Loading