Skip to content

Commit

Permalink
Clarify stance on non-standard formatting
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 397409499
  • Loading branch information
amalloy authored and Error Prone Team committed Sep 17, 2021
1 parent ec43413 commit b3ae95e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/bugpattern/ParameterName.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ booleanMethod(/* enableFoo= */ true);
Varargs methods are also supported using `...` syntax: `void varargsMethod(/*
states...= */ true, true, false);`

The check also recognizes comments with whitespace variations, e.g. `/*foo =*/`,
but the form `/* foo= */` is preferred.

If the comment deliberately does not match the formal parameter name, using a
regular block comment without the `=` is recommended: `/* enableFoo */`.

0 comments on commit b3ae95e

Please sign in to comment.