Tweak checkstyle settings

This commit is contained in:
filoghost 2021-05-18 09:48:24 +02:00
parent f370dfff4f
commit 305931bd73
3 changed files with 12 additions and 3 deletions

View File

@ -41,7 +41,9 @@
<module name="TreeWalker"> <module name="TreeWalker">
<!-- Blocks --> <!-- Blocks -->
<module name="AvoidNestedBlocks"/> <module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/> <module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="EmptyCatchBlock"> <module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected|ignore"/> <property name="exceptionVariableName" value="expected|ignore"/>
</module> </module>
@ -64,7 +66,6 @@
</module> </module>
<module name="DefaultComesLast"/> <module name="DefaultComesLast"/>
<module name="EmptyStatement"/> <module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/> <module name="EqualsHashCode"/>
<module name="FallThrough"/> <module name="FallThrough"/>
<module name="IllegalThrows"/> <module name="IllegalThrows"/>
@ -159,7 +160,8 @@
<!-- Whitespace --> <!-- Whitespace -->
<module name="RegexpSinglelineJava"> <module name="RegexpSinglelineJava">
<property name="format" value="[^\s]\s+$"/> <!-- Tolerate one trailing space, except immediately after curly braces, left parenthesis and semicolon -->
<property name="format" value="([^\s]\s{2,}|[}{(;]\s+)$"/>
<property name="minimum" value="0"/> <property name="minimum" value="0"/>
<property name="maximum" value="0"/> <property name="maximum" value="0"/>
<property name="ignoreComments" value="true"/> <property name="ignoreComments" value="true"/>

View File

@ -10,4 +10,10 @@
<suppress <suppress
checks="Header" checks="Header"
files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]bridge[\\/]protocollib[\\/].+\.java"/> files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]bridge[\\/]protocollib[\\/].+\.java"/>
<suppress
checks="LeftCurly|EmptyLineSeparator"
files="[\\/]me[\\/]filoghost[\\/]holographicdisplays[\\/]nms[\\/]\w+[\\/]Craft.+\.java"/>
<suppress
checks="SummaryJavadoc"
files="[\\/]com[\\/]gmail[\\/]filoghost[\\/](holograms|holographicdisplays)[\\/]api[\\/].+\.java"/>
</suppressions> </suppressions>

View File

@ -374,6 +374,7 @@
</dependency> </dependency>
</dependencies> </dependencies>
<configuration> <configuration>
<consoleOutput>true</consoleOutput>
<configLocation>${rootDir}/checkstyle/checkstyle.xml</configLocation> <configLocation>${rootDir}/checkstyle/checkstyle.xml</configLocation>
<propertyExpansion>samedir=${rootDir}/checkstyle</propertyExpansion> <propertyExpansion>samedir=${rootDir}/checkstyle</propertyExpansion>
<sourceDirectories> <sourceDirectories>