-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
review: checkstyle: Spotless configuration #5984
base: master
Are you sure you want to change the base?
Conversation
I haven't looked at it, but you need to preserve complete formatting for the generated assertions. It was limited to assertions deliberately: The generated tests do not follow a consistent formatting, so the spotless run is required to prevent changes on every execution. If you remove that, the generated code CI will fail on you. Just re-ordering import statements will not cut it for the generated code. |
Got it! Thank you So the goal is to not have a Initially, I didn't want to modify a lot of files here, just the |
Yes, exactly. The import order stuff (and also general formatting, I guess) would be nice for all of spoon. The generated assertions need to be completely managed by spotless though, so there is no diff after generation.
Sounds fine for a second commit in this PR, yea. |
My mistake, you are right. I need to commit all the result of |
If the reformat looks good and you are happy (and tests pass and the integrators are happy), you should create a
This will cause GitHub, |
Because the strategy is a squash, the commit hash will be different compared to my local branch. It should be done in at least two PR, right? One, here, with the reformatting and another one with the |
This comment was marked as off-topic.
This comment was marked as off-topic.
This reverts commit 9936038.
close #5741
I update the configuration of the Spotless plugin.
The existing configuration was too specific (the scan was limited to
src/test/java/spoon/testing/assertions/**/*.java
). The new one is global (only test classes are excluded,**/testclasses*/**
).The order of the imports is:
I also apply the IntelliJ basic style about the indentation (4 spaces) and whitespaces are trimmed.
Spotless documentation: https://github.com/diffplug/spotless/tree/main/plugin-maven