#730: Added a checkstyle rule to check for missing package declarations.

Added a suppression to ignore the test sources.

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
Bukkit/Spigot 2022-02-19 09:33:06 +11:00
parent 9d127bc843
commit 0f857065bd
3 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,9 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
<suppressions>
<!-- Don't check for missing package declarations in tests-->
<suppress checks="JavadocPackage" files=".*[\\/]src[\\/]test[\\/].*\.java$"/>
</suppressions>

View File

@ -20,6 +20,9 @@
<property name="message" value="Line has trailing spaces."/>
</module>
<!-- See https://checkstyle.sourceforge.io/config_javadoc.html#JavadocPackage-->
<module name="JavadocPackage"/>
<module name="TreeWalker">
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="AtclauseOrder"/>

View File

@ -217,6 +217,7 @@
</executions>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
<dependencies>