-
Notifications
You must be signed in to change notification settings - Fork 43
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
Spotless
instead of intellij formatting
#306
Conversation
a28bb5a
to
6488096
Compare
So, if I understand correctly, the current state of formatting stays for all files, except the ones that will be changed by later commits. It's hard to imagine the new formatting from just config files, would it be possible to see the difference on a few example files? @leventeBajczi |
@AdamZsofi: good idea, I pushed the |
33b0782
to
5323d7f
Compare
Benchexec test report for a selection of SV-Benchmarks (correct / incorrect / all):
|
This PR replaces the automatic format- and copyright checks, which currently mostly relied on IntelliJ IDEA's
format.sh
script, with the spotless project.The main reason for this change is that a simple version update (from
2023.x
to2024.x
) modified how the code style is applied to Java and Kotlin files. I think this is unacceptable.Further advantages of
spotless
:./gradlew spotlessApply
)Some disadvantages:
Spotless
currently does not support intellij code style XMLsThis PR also reverts recent changes in e37b323 and 185dc7a. These are recent formatting commits that should never happen again. This will hopefully fix merge issues before they are dealt with in e.g. #304.
The formatting rules can be found in java-common.build.kts. I'm open to any suggestion on what formatters, with which options to enable. Please check the plugin's README for options.
I would expect some insights from recent contributors to Theta, such as @mondokm, @RipplB, @AdamZsofi, @szdan97, @as3810t, @csanadtelbisz, @s0mark (Sorry if I missed anyone!)
(Note that on this PR, the checks will most likely fail. I deliberately don't want to re-edit the reverted files.)