-
-
Notifications
You must be signed in to change notification settings - Fork 352
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.
Are you happy with this PR, i.e. can I take a look at it? :) |
Yes everything should be ok now! I am waiting for an eventual squash to create a second PR with the |
ab73711
to
a42ccda
Compare
a42ccda
to
2c1283f
Compare
I ported your changes onto the head of master to fix conflicts and separated configuration and formatting in separate commits (so it is easier to change in the future, if necessary). Looking at the diff, I am also not sure if the formatting is a benefit or drawback. It also seems quite hard to get IJ to reproduce it. WDYT @SirYwell @MartinWitt? |
Hello, any updates? It's been a while since the last activity. Please let me know if there's anything I can do. |
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