Skip to content

How to report the issue (example)

Roman Ivanov edited this page Mar 15, 2017 · 2 revisions

FYI, Download jars for launch (!!please use the latest versions!!):

wget https://raw.githubusercontent.com/sevntu-checkstyle/sevntu.checkstyle/gh-pages/maven2/com/github/sevntu/checkstyle/sevntu-checks/1.23.1/sevntu-checks-1.23.1.jar
wget https://downloads.sourceforge.net/project/checkstyle/checkstyle/7.5/checkstyle-7.5-all.jar

HERE is content that is mandatory in issue description:

$ cat 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="UTF-8"/>
    <property name="fileExtensions" value="java, properties, xml"/>
    <module name="TreeWalker">
        <module name="com.github.sevntu.checkstyle.checks.design.ConstructorWithoutParamsCheck"/>
    </module>
</module>
$ cat Test.java 
public class Test {
    public void demo() {
        throw new IllegalStateException();
    }
}

Execution:

$ java -classpath sevntu-checks-1.23.1.jar:checkstyle-7.5-all.jar com.puppycrawl.tools.checkstyle.Main -c config.xml Test.java 
Starting audit...
[ERROR] Test.java:3:15: Calls to constructors of 'IllegalStateException' should use at least one parameter. [ConstructorWithoutParams]
Audit done.
Checkstyle ends with 1 errors.

Describe what is expected.