Skip to content

IntelliJ plugin ignores @Formatter:off/on #748

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

Closed
SebHo0 opened this issue Feb 14, 2022 · 3 comments
Closed

IntelliJ plugin ignores @Formatter:off/on #748

SebHo0 opened this issue Feb 14, 2022 · 3 comments

Comments

@SebHo0
Copy link

SebHo0 commented Feb 14, 2022

What happened?

The IntelliJ plugin ignores formatter guards (e.g. @Formatter:off/on) even though IntelliJ itself is setup to respect it.

What did you want to happen?

Do not overwrite the formatter guard settings (or at least provide a settings option to respect those).

@tbroyer
Copy link
Contributor

tbroyer commented Feb 14, 2022

The idea is that if you opt into Google Java Format, you're opting out of those "magic comments".
See https://github.com/google/google-java-format/wiki/FAQ#why-cant-i-use-magic-comments-to-disable-formatting-for-certain-sections-of-code

@SebHo0
Copy link
Author

SebHo0 commented Feb 14, 2022

Thank you for the quick reply.

I really wonder why this seems to be such a rare issue for the users of the plugin.
Anyhow, the plugin without this feature does not seem to be the 100% perfect solution in our case.

FYI: In our project, we would like to protect some concatenated strings which build up some kind of sql query from rearrangement to keep it more human readable.

@cushon
Copy link
Collaborator

cushon commented Feb 23, 2022

#137

@cushon cushon closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants