CommentsIndentation Check false-positive in empty array declarations #3127

Closed
Vladlis opened this Issue Apr 25, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@Vladlis
Member

Vladlis commented Apr 25, 2016

vlad@vlad-N61PC-M2S ~/cli $ java -jar checkstyle-6.17-all.jar com.puppycrawl.tools.checkstyle.Main -c my_check.xml Test.java
Starting audit...
[ERROR] /home/vlad/cli/Test.java:4: Comment has incorrect indentation level 12, expected is 25, indentation should be the same level as line 3. [CommentsIndentation]
Audit done.
Checkstyle ends with 1 errors.
vlad@vlad-N61PC-M2S ~/cli $ cat Test.java
public class Test {
    void foo3() {
        String[] array = { // line 3
            // violation - line 4
        };
    }
}
vlad@vlad-N61PC-M2S ~/cli $ cat my_check.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">


<module name = "Checker">
    <module name="TreeWalker">
         <module name="CommentsIndentation">
         </module>
    </module>
</module>

Expected - no violations.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Jun 9, 2016

Member

Fix is merged

Member

romani commented Jun 9, 2016

Fix is merged

@romani romani added this to the 7.0 milestone Jun 9, 2016

@romani romani closed this Jun 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment