-
Notifications
You must be signed in to change notification settings - Fork 91
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
'tabulation.char=space' is not honoured and not formatted with spaces #269
Comments
Have you tried that configuration file in Eclipse directly? This plugin uses the Eclipse formatter and should format exactly as Eclipse would. I think the problem might be that Eclipse won't necessarily change whitespace unless there's another formatting change also required. I could be wrong about that. |
Oh, I think I might know what's happening. I think it's not using your plugin configuration correctly, because it's not being executed as part of a maven build lifecycle. This is the same issue as #261 . Try running Also, since you're just using |
@ctubbsii Running as part of a lifecycle worked. Tried it with Thanks |
I ran into this same problem on a multimodule project (where I was erroneously trying to refer to the parent directory). Underlying issue seems to be that the plugin doesn't fail if it can't find the formatter file from the config, but instead silently reverts to the default setup. In debug mode, there's a stacktrace showing the file wasn't found. |
@leblonk Sounds like a separate issue. Mind creating one regarding the silent failure when the preferred config cannot be loaded? |
So done: #275 |
Using the following plugin configuration:
and the attached Eclipse formatting file
eclipse-code-formatter.xml.txt
with the 'Tab policy' set to 'Spaces only':Running
mvn formatter:format
formats files with tab characters and not spaces as per the formatter file setting.However, using the Eclipse Code Formatter IntellIJ plugin and the same formatter file as attached and the result is as expected (using spaces).
The text was updated successfully, but these errors were encountered: