Pattern: Malformed comment indentation
Issue: -
This rule controls the indentation between comments and surrounding code. By default it enforces recommendation by Google Java Style Guide - comments should be indented at the same level as the surrounding code.
Note: if comment block appears to be at the same level as surrounding code it's most likely caused by usage of mixed spaces and tabs.
<module name="CommentsIndentation"/>
Example of incorrect code:
// comment at the same indentation level
boolean bool = true;
/* violation
* (block comment should have the same indentation level as line below)
*/
double d = 3.14;
Example of correct code:
// comment at the same indentation level
boolean bool = true;
/* Block comment
* at the same indentation level
*/
double d = 3.14;