-
Notifications
You must be signed in to change notification settings - Fork 870
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
Before commit reformatting option in IntelliJ does invoke plugin #228
Comments
What's the status? Should I try to fix it myself? |
Hey there, I tried to reproduce this, but was not able to. It's very old, though, so maybe it got fixed in some interim version. Can you still reproduce it? What version of the plugin do you have and what version of the IDE? Thanks and sorry for the delay... |
This is still a problem with 1.6.0 of the plugin and the latest version of IntelliJ (2018.1.4/IU-181.5087.20). To reproduce:
|
I tried it out again and it seems to be fixed. My setup is: You are describing a different problem @codahale. Apparently 'Reformat code' in the commit dialog is doing nothing for you. My problem was that 'Reformat code' in the commit dialog was actually changing the files but without using the google-java-format plugin, hence falling back to my Code Style Sheet. That should probably be filed as a separate issue, but that is not my call to make. This issue can be closed for my part. |
Well, now I can’t reproduce my problem either, so I assume this is fixed. |
Actually, no — I can confirm w/ 2018.1.5/IU-181.5281.24 that it uses the Code Style settings and not google-java-format. This was always the problem I was experiencing, but perhaps I didn’t describe it well. |
To reproduce:
|
I'm also seeing this issue (version 1.6.1 of the plugin) |
We're also experiencing this issue. Is there any progress on this? Reproducable on Windows 7 and macOS 10.13 with IntelliJ IDEA 2017.3, 2018.1 and 2018.2 using plugin 1.5.0 and 1.6.1. |
Same issue with IntelliJ 2019.1 (IU-191.6183.87), google-java-format v1.7.0.1
|
It has been two years since this issue was posted, any progress? |
I really wish I could use the automatic formatter. IntelliJ IDEA 2019.1.1 (Community Edition) @plumpy Please fix? This issue and #264 are assigned to you and have been ignored for 2 years. |
My current workaround is to use XML based intellij-java-google-style file instead of this google-java-format plugin. It works fine, but the formatted code is slightly different from the output of this plugin. |
@YanzheL We're doing the same as workaround. We used plugin google-java-format for a while but not being able to use before commit action is confusing and frustrating our developers. This is a show stopper for us. Last tested on |
This should be just a matter of overriding |
Are there any plans to support this in the future? |
Am having this exact same issue, any work arounds possible ? We face many merge conflicts due to this. |
I am having the same issue, any update on this? |
Also observing the same issue. The workaround with the codestyle.xml is nice, but the formatting can be wildly different. Especially regarding annotations (on single line, annotation indentation, ...) so the workaround is in the end not really sufficient as you still have to always apply the style either manually or via a maven plugin. |
…roblem with "Reformat code" in commit dialog see google/google-java-format#228
…roblem with "Reformat code" in commit dialog see google/google-java-format#228
We faced the same issue. Can we expect that it will be fixed? |
I have the IntelliJ plugin installed and reformatting works as expected. If I select 'Reformat code' option in commit window, then it will take my currently selected Code Style sheet and not use google-java-format. It sets indentation to 4 spaces instead of 2 for example. Reformatting after committing then immediately gives local changes.
Is this a known issue? Will this be solved?
The text was updated successfully, but these errors were encountered: