You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
First thanks for this great maven plugin! I have a project where the builds break with
org.apache.maven.plugin.MojoFailureException: File '.../xyz.java' has not been previously formatted. Please format file (for example by invoking `mvn net.revelc.code.formatter:formatter-maven-plugin:2.24.1:format`) and commit before running validation!
However I formatted the source code using the same config with the formatter plugin. So I have no idea what is going wrong.
Describe the solution you'd like
Please add an option to output a diff between the supposedly unformatted file and what the formatter thinks the formatted file should look like. This can help tracking down the underlying issue, may it be a bug in the formatter, with the line encoding, etc.
Hi @sebthom, is this something you would be willing to provide support for here? It would happen quicker if you could contribute such an update.
As to the issue you are facing, can you provide a small reproducible project that shows this behavior so we can easily take a look to see. Add instructions to it on how you ran it to confirm.
Also keep in mind, add version you used here, platform you are on, etc. Anything that can help with diagnosing the issue.
Is your feature request related to a problem? Please describe.
First thanks for this great maven plugin! I have a project where the builds break with
However I formatted the source code using the same config with the formatter plugin. So I have no idea what is going wrong.
Describe the solution you'd like
Please add an option to output a diff between the supposedly unformatted file and what the formatter thinks the formatted file should look like. This can help tracking down the underlying issue, may it be a bug in the formatter, with the line encoding, etc.
E.g. using https://github.com/java-diff-utils/java-diff-utils
So we get something like this https://github.com/diffplug/spotless?tab=readme-ov-file#%EF%B8%8F-spotless-for-maven
The text was updated successfully, but these errors were encountered: