google-java-format
google-java-format copied to clipboard
Multiline TODO formatting is incorrect
Transplanting this issue https://github.com/facebook/ktfmt/issues/239
To confirm, it sounds like the report is that given a TODO like:
// TODO: We still have a lot of work to do here. We still have a lot of work to do here. We still have a lot of work to do here. We still have a lot of work to do here.
... the formatter will wrap it to two lines like this:
// TODO: We still have a lot of work to do here. We still have a lot of work to do here. We still
// have a lot of work to do here. We still have a lot of work to do here.
And IntelliJ has a feature that recognize multi-line TODOs and highlights them, but only if the following lines have additional indentation, and you would like the formatter to do that automatically?
// TODO: We still have a lot of work to do here. We still have a lot of work to do here. We still
- // have a lot of work to do here. We still have a lot of work to do here.
+ // have a lot of work to do here. We still have a lot of work to do here.
Note that the formatter won't change // comments in this way unless there longer than the column limit, so if there are existing comments with the extra space that don't need wrapping it will leave them alone.
Yeah, that sounds right to me.