Skip to content

minor: configure spotless#19308

Open
kgyrtkirk wants to merge 1 commit into
apache:masterfrom
kgyrtkirk:pr/conf-spotless
Open

minor: configure spotless#19308
kgyrtkirk wants to merge 1 commit into
apache:masterfrom
kgyrtkirk:pr/conf-spotless

Conversation

@kgyrtkirk
Copy link
Copy Markdown
Member

Spotless could do a little bit more than checkstyle which is only pointing out where the problems are - it also provides a way to fix issues.

This changeset configures the importorder and some other simpler rules.
I wanted to also configure the formatter - but that changes indentation in a lot of files; haven't figured out a way to avoid most changes which seem to be just noise.

Even the import order changes a lot of files; there are a lot of files where a blank line between javax and java was missing.

The real meaningfull changes could be viewed with:

git diff `git merge-base HEAD apache/master` HEAD -w  --ignore-blank-lines

09a5615 remove-formatter
3f50d41 new
88e274a Merge remote-tracking branch 'apache/master' into conf-spotless
257cd24 mx
e6fd999 up
28c76ed up
6acf1e7 up
d3fd788 f
3a7c7b2 f
eb1615e 49
f09dd1a a
72ebf40 up2
401b2e9 import2
ec06833 apply0
9c90a7c accept-style0
d7b48e1 add-spotless
@FrankChen021
Copy link
Copy Markdown
Member

The changes LGTM, no correctness issues found.

Copy link
Copy Markdown
Member

@FrankChen021 FrankChen021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity Findings
P0 0
P1 0
P2 1
P3 0
Total 1

This is an automated review by Codex GPT-5

Comment thread pom.xml
</excludes>
<cleanthat>
<version>2.25</version>
<sourceJdk>${maven.compiler.source}</sourceJdk>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Use the Java 17 release for CleanThat

The new Spotless/CleanThat configuration uses ${maven.compiler.source}, which resolves from the Apache parent to 1.8, while this repo compiles with ${maven.compiler.release} set to Java 17 and already contains Java 17 syntax such as text blocks and records. Since Spotless runs during validate across modules, CleanThat can parse/rewrite valid project sources as Java 8 or fail on them, breaking normal builds. Point sourceJdk at ${maven.compiler.release} or ${java.version} instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants