8000 JavadocVariable doesn't report missing comment when excludeScope=anoninner · Issue #3183 · checkstyle/checkstyle · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
JavadocVariable doesn't report missing comment when excludeScope=anoninner #3183
Closed
leojahn1/checkstyle
#1
@edrandall

Description

@edrandall

JavadocVariable - https://checkstyle.org/config_javadoc.html#JavadocVariable

does not report missing comments on member variables in a standard class, irrespective of scope, when excludeScope="anoninner".

config.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">
    <property name="charset" value="ASCII" />
    <property name="severity" value="error" />
    <property name="fileExtensions" value="java"
5D1A
 />

    <module name="TreeWalker">
        <module name="JavadocVariable">
            <property name="excludeScope" value="anoninner" />
        </module>
    </module>
</module>

TestClass.java:

package test;

/** Class for testing checkstyle. */
public class TestClass {

    private String key;

    public TestClass() {
    }
}

$ java -jar checkstyle-6.18-all.jar -c config.xml TestClass.java
Actual output:

Starting audit...
Audit done.

Expected output:

Starting audit...
[ERROR] C:\checkstyle\TestClass.java:6:9: Missing a Javadoc comment [JavadocVariable]
Audit done.
Checkstyle ends with 1 errors.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0