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

Wrap long javadoc lines where possible #651

Open
xenoterracide opened this issue Feb 28, 2024 · 0 comments
Open

Wrap long javadoc lines where possible #651

xenoterracide opened this issue Feb 28, 2024 · 0 comments

Comments

@xenoterracide
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant