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

Eclipse format changes single-line javadocs #725

Open
bentatham opened this issue Nov 9, 2022 · 0 comments
Open

Eclipse format changes single-line javadocs #725

bentatham opened this issue Nov 9, 2022 · 0 comments

Comments

@bentatham
Copy link

The eclipse-java-google-style.xml specifies that javadoc should always be the "basic" format:

The basic formatting of Javadoc blocks is as seen in this example:

/**
 * Multiple lines of Javadoc text are written here,
 * wrapped normally...
 */
public int method(String p1) { ... }

but that single-line javadocs are allowed when it fits on one line.

Other tools (like that google formatter in spotless maven plugin) reflows this to a single line when possible.

The solution is to change one settings in the eclipse format profile to be:

<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="false"/>
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