-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Can gradle tidy
reflow text properly when it inserts newlines?
#13766
Comments
+1, I'd love to have this improvement! |
I don't think you can fix this, no. Use block comments - they are formatted properly: |
For clarity: you can, of course, try to file a feature request to google java format, but I think it works as advertised - you're using line comments as a block comment... Reflowing these would mean intentional line comments would be lost.
|
So I just double checked and block-level comments are treated as preformatted within code. This:
is tidied up to this:
I personally think this is the right choice by gjf - breaks long lines into visibility but does not break any other line comments (and potentially damage them). Block comments I think this issue can be closed, sorry if it bothers you, but it's an operator's error. :) There are more headaches coming with the markdown comments spec [1]. It'll be fun. |
Description
I'm working on #13519, and ran
gradle tidy
to ... tidy things up, and it does this:It's because my original line wrap was too long for its taste, which is fine. But, then it creates these widow lines with just one or two words. I can revisit and reflow to right column width, manually, but can we fix tidy to not do this? It would ideally not gleefully create widow lines like this!
The text was updated successfully, but these errors were encountered: