Qulice - How to disable rule that requires package-info.java on the entire project?

513 views Asked by At

I've setup my pom.xml to use Qulice:

<build>
    <plugins>
        <plugin>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-maven-plugin</artifactId>
            <version>0.17.3</version>
            <configuration>
                <license>file:${basedir}/LICENSE.txt</license>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

I've added some initial files and ran mvn clean install, then Qulice complains:

[INFO] Checkstyle: src/main/java/hk/com/novare/App.java[0]: Missing package-info.java file. (JavadocPackageCheck)

[INFO] Checkstyle: src/main/java/hk/com/novare/App.java[2]: Line does not match expected header line of ' */'. (HeaderCheck)

[INFO] Checkstyle: src/main/java/hk/com/novare/App.java[28]: Missing '@since' tag in class/interface comment (JavadocTagsCheck)

There is a way to exclude certain files from Qulice, as documented here, but is there a way to exclude a certain rule from the entire project, such as Checkstyle's JavadocPackageCheck rule ?

2

There are 2 answers

1
Ryan Leach On BEST ANSWER

According to https://github.com/teamed/qulice/issues/507#issuecomment-162519518 As of Dec 7, 2015 It's apparently a 'feature' of qulice the inability to further customize the best practices they ship, and they do not provide a way to disable rules barring the inherent annotations shipped with each of the tools that it comprises.

Their recommendation would likely to be to use the individual tools yourself, with your own configuration if you wish to.

0
rocket-3 On

Sometimes you just need to do this in real practice.

There is a way using @checkstyle <RuleName> (<N> lines) comment and @SuppressWarnings("PMD.<RuleName>") code annotations, see the Qulice's site page.

This works with latest Qulice maven plugin (0.18.19), just place it above line the error points at.