镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Option to enable JavaDoc formatting for Palantir code formatter #1995

Closed

Description

@blutorange

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?

Activity

  1. Goooler commented on Jan 14, 2024

    @Goooler
    Member

    That would be awesome!

  2. Goooler commented on Jan 14, 2024

    @Goooler
    Member

    Links #1287.

  3. added a commit that references this issue on Jan 18, 2024
  4. added a commit that references this issue on Jan 22, 2024
    13d9627
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions