You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey! GJF added the option to disable formatting of javadoc.
EDIT: #1287 already handles this but:
i would in general just like for the formatter to ignore comments, google java format still seems to format linebreaks in javadocs
is this possible to set? i couldnt find it in the example
The text was updated successfully, but these errors were encountered:
i would in general just like for the formatter to ignore comments, google java format still seems to format linebreaks in javadocs
Spotless is mostly a switchboard for other formatters. We do have spotless:off/on tags which you can use to preserve a specific section.
It would be possible to use that same technique to store all comments and then restore them after gjf or other steps have mangled them, but it would be very difficult. I don't think it's worth the effort, but I'd be happy to merge a PR which supports full comment preservation. My recommendation would be to
Look at this PR first, which implements the easy part of what you'll need
Now write the docs for your new step and open a draft PR to get feedback on the plan
Now you'll need to parse comments, save them as per the PR above, and then restore them into the newly changed code (hard!!!)
Or, you can submit a PR to GJF or maybe palantir-java-format to get them to ignore comments. Once they have the feature, turning it on in Spotless would be easy.
Hey! GJF added the option to disable formatting of javadoc.
EDIT: #1287 already handles this but:
i would in general just like for the formatter to ignore comments, google java format still seems to format linebreaks in javadocs
is this possible to set? i couldnt find it in the example
The text was updated successfully, but these errors were encountered: