-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Maintenance] Add spotless options #152
Comments
I suggest using semanticSort set to true with <importOrder>
<semanticSort>true</semanticSort> <!-- Sort by package, then class, then member (for static imports). Splitting is based on common conventions (packages are lower case, classes start with upper case) -->
</importOrder> |
The new mentioned options are only available in a later Spotless version (see diffplug/spotless#1920) than the one thats currently in use. With the problem mentioned in #16 we need to set this issue to blocked for now. |
We used https://github.com/revelc/formatter-maven-plugin before we switched to spotless. It's way more limited than spotless, but at least Eclipse JDT rules from https://github.com/it-at-m/itm-java-codeformat can be checked/enforced in CI without side-loading stuff from the internet as spotless currently needs. |
Relevant template
refarch-backend, refarch-eai
Problem description (optional)
Spotless has capabilities currently not used (import sorting, removing unused imports and so on)
Desired solution
Add the options
I took a look at the currently used https://github.com/it-at-m/itm-java-codeformat/blob/main/formatter/src/main/resources/itm-java-codeformat/java_codestyle_formatter.xml.
Those options are not available there.
Alternatively to the standard import order mentioned above, we could think about a custom import order. An example:
Considered alternatives (optional)
No response
Additional context (optional)
No response
No duplicate
Code of Conduct
The text was updated successfully, but these errors were encountered: