-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add Spotless to build #1926
Add Spotless to build #1926
Conversation
@@ -1,4 +1,4 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflicts with the changes that would be made by updatecli/generate-manifests.ps1
, but that script has been disabled for quite some time and is effectively dead code that the maintainers ought to remove from this repository.
@@ -33,7 +34,6 @@ if (settings.activeProfiles.any {it ==~ /^2[.][0-9]+[.]x$/}) { | |||
|
|||
expected: $sortedDeps | |||
""") | |||
// TODO also check sorting of sample plugin dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally implementing this long-standing TODO.
<plugin> | ||
<groupId>com.diffplug.spotless</groupId> | ||
<artifactId>spotless-maven-plugin</artifactId> | ||
<configuration> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration has to be duplicated here unfortunately because sample-plugin
extends from the plugin POM and not the root of the multi-module project. This is basically a hack as explained in #683.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much. I was missing this to maintain the sorted order of entries in the pom files.
My first line of defense when working on Groovy code is Spotless: if Spotless can't format it, then Groovy certainly won't be able to interpret it. "Testing" Groovy code with Spotless saves me time. So I am introducing Spotless in this repository. This PR applies Spotless to all
pom.xml
, Java, and Groovy files in this repository. I recommend reviewing this with the Hide Whitespace changes feature enabled.