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

short Javadoc in basic form with block tag gets formatted to single-line form #193

Closed
tbcs opened this issue Sep 22, 2017 · 2 comments
Closed

Comments

@tbcs
Copy link

tbcs commented Sep 22, 2017

This behavior violates §7.1.1 of the style guide.

How to reproduce:

$ cat Customer.java
interface Customer {
  /**
   * @return the customer ID
   */
  int getId();
}
$ java -jar google-java-format-1.4-all-deps.jar Customer.java
interface Customer {
  /** @return the customer ID */
  int getId();
}

This issue has been brought up before in #117.

@cushon
Copy link
Collaborator

cushon commented Sep 25, 2017

The summary fragment is required: https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment, so that example is already in violation of the style guide.

@tbcs
Copy link
Author

tbcs commented Sep 26, 2017

@cushon: Indeed. I don't understand how I managed to overlook that. After a few days of using the Google style it's quite obvious that the above snippet does not conform. Sorry for the confusion, this issue can be closed.

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

2 participants