CommentsIndentation Check false-positive when a singleline comment follows a block comment #3126

Closed
Vladlis opened this Issue Apr 25, 2016 · 0 comments

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:6: Comment has incorrect indentation level 8, expected is 16, indentation should be the same level as line 5. [CommentsIndentation]
Audit done.
Checkstyle ends with 1 errors.
vlad@vlad-N61PC-M2S ~/cli $ cat Test.java
public class Test {
    void foo1() {
        foo1();
        /*
         line 5 */
        // violation - line 6
    }
}
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.

Vladlis added a commit to Vladlis/checkstyle that referenced this issue Apr 27, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue Apr 27, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 10, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 11, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 11, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 11, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 11, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 12, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 22, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 22, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 23, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 24, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 24, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 24, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 25, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 25, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 25, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 27, 2016

Vladlis added a commit to Vladlis/checkstyle that referenced this issue May 27, 2016

romani added a commit that referenced this issue May 30, 2016

romani added a commit that referenced this issue May 30, 2016

@romani romani added this to the 7.0 milestone May 31, 2016

@romani romani closed this May 31, 2016

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