Skip to content

Wrap long javadoc lines where possible #651

@xenoterracide

Description

@xenoterracide

Prettier-Java 2.6.0

# Options (if any):
--print-width 120

Input:

/**
 * Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for later usage.
 * This Service should not be considered a published API, and may change or be removed in future versions.
 */

Output:

/**
 * Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for later usage.
 * This Service should not be considered a published API, and may change or be removed in future versions.
 */

Expected behavior:

/**
 * Build Service for Git. Primary goal is to allow for lazy initialization of the Git object and keeping it open for
 * later usage. This Service should not be considered a published API, and may change or be removed in future versions.
 */

beware of word breaking though, this for example shouldn't try to wrap even though it's too long. Note: I'm not certain if this would try to reformat now, and it isn't javadoc, but maybe this issue applies to all comments and I just haven't noticed.

  // https://github.com/diffplug/spotless/blob/224f8f96df3ad42cac81064a0461e6d4ee91dcaf/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/GitRatchetGradle.java#L35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions