KAFKA-10787: Apply spotless to transaction-coordinator and server-common#16172
Conversation
|
@gongxuanzhang Could you please update the description to share the tips of "how to test this PR"? |
|
@chia7712 I changed it , plz take a look |
|
@gongxuanzhang Could you please check the build error? |
|
It seems we are facing Trolley problem :(
Given that we are going to get rid of JDK 8 and there is example of ignoring JDK8 Maybe we can remove the support of JDK8 from spotless!
@gongxuanzhang WDYT? |
|
I agree remove support JDK8. |
|
@gongxuanzhang please fix the conflicts |
|
@chia7712 complete |
9fb6d4e to
f2aafcc
Compare
chia7712
left a comment
There was a problem hiding this comment.
@gongxuanzhang Could you please rebase code to trigger QA again?
| } | ||
|
|
||
| if(JavaVersion.current().isJava11Compatible() && project.path !in excludedSpotlessModules) { | ||
| // current spotless work error in JDK21,upgrade spotless version when kafka drop support JDK8 |
There was a problem hiding this comment.
the task `removeUnusedImports` is implemented by google-java-format, and unfortunately the google-java-format version used by spotless 6.14.0 can't work with JDK 21. Hence, we apply spotless tasks only if the env is either JDK11 or JDK17
WDYT?
There was a problem hiding this comment.
i will update comment
|
I have called QA again |
|
@gongxuanzhang could you please rebase code to include #16249 |
|
Okay, next we wait for CI @chia7712 |
…on (apache#16172) Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
Brief Introduction
This PR is sub PR from #16097.
That Pr we add spotless plugin to build.gradle.
In order not to modify large-scale code, we plan apply it step by step in module.
The first is 'transaction-coordinator' 'server-common'.
Module 'transaction-coordinator' meets the requirements(only have 2 Java class) so apply it directly.
This PR update 'server-common' module code review import order.
We will apply
spotlessto all module in futureHow to test:
We can run
./gradlew spotlessCheckcheck for code that does not meet requirements.If we get report that error , we can run
./gradlew spotlessApplyto review my code.In this PR, all change(exclude
build.gradle)byspotlessApply`