Skip to content
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

Option to enable JavaDoc formatting for Palantir code formatter #1995

Closed
blutorange opened this issue Jan 13, 2024 · 2 comments · Fixed by #2009
Closed

Option to enable JavaDoc formatting for Palantir code formatter #1995

blutorange opened this issue Jan 13, 2024 · 2 comments · Fixed by #2009

Comments

@blutorange
Copy link
Contributor

Formatting JavaDoc can be very helpful when writing docs, especially to add the appropriate line breaks so that text is not longer than the configured line width.

Palantir, which is based on the Google formatter, supports formatting JavaDoc.

In palantir/palantir-java-format#152 they've disabled the formatting of JavaDoc by hardcoding a "false" value.

According to the comments palantir/palantir-java-format#724, the intended way forward is that it should stay disabled by default, but tools may expose an option to enable it.

After taking a quick look, all we would have to do is to add an option formatJavadoc to the Palantir settings, pass on that configuration value to PalantirJavaFormatFormatterFunc, and add .formatJavadoc(formatJavadoc) when creating the formatter options.

I would take a look at a PR if adding such an option is OK?

@Goooler
Copy link
Member

Goooler commented Jan 14, 2024

That would be awesome!

@Goooler
Copy link
Member

Goooler commented Jan 14, 2024

Links #1287.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants