-
Notifications
You must be signed in to change notification settings - Fork 458
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
Maven Plugin global ratchetFrom not working with multiple formatters #664
Comments
Working local ratchetFrom: https://gitlab.com/bss03/spotless-664/-/tree/07f9a922ed539bca8665148a2bb621954fc76aaa Non-working global ratchetFrom: https://gitlab.com/bss03/spotless-664/-/tree/101d59d9691bf2e99761b2797072b9dac9ede13c
|
Example doesn't even use multiple formatters. I'm guessing global ratchetFrom is just completely broken, but I'm not sure. |
Thanks for reporting, fixed in |
Maven Plugin global ratchetFrom not working with multiple formatters
I have a "global" ratchetFrom like
<configuration><ratchetFrom>A_SHA_HASH</ratchetFrom>...
and both a "java" and a "formats" section. Under the "formats" there are two "format"s. All 3 use using prettier, with different plugins, parsers, options, and (non-overlapping) includes.In the above case, I got an error from spotless:check for a file that that not been changed since the ratchet point. I thought that it might just be a problem with prettier or one of the sub-configurations. So, I copied the ratchetFrom into the format that covered the file it was complaining about. The first error went away, but I got an error from the other format, about another file that has not been changes since the ratchet point. I repeated the process, but ended up having to copy the ratchetFrom into both "format" elements and the "java" element.
Finally, spotless behaved as expected. I then removed the global ratchedFrom, and it was still successful.
The documentation clearly says ratchetFrom is supposed to work "globally", and may (but is not required to be) specified on each format as well: https://github.com/diffplug/spotless/tree/a1b5e90a9d0788bcc5a651ae424deb06330a92b1/plugin-maven#how-can-i-enforce-formatting-gradually-aka-ratchet
gradlew spotless[Apply/Check] --stacktrace
(TBD)I need to reproduce in a public repository. I'm not comfortable even sharing the error messages generated out of our propritary repository. So, the copy-paste requirements above are TBD.
I hope it won't take long to publicly reproduce.
The text was updated successfully, but these errors were encountered: