mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2024-11-11 11:29:29 +00:00
52 lines
2.1 KiB
XML
52 lines
2.1 KiB
XML
<?xml version="1.0"?>
|
|
<ruleset name="Floodgate Rules"
|
|
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
|
|
|
<description>
|
|
Floodgate Code ruleset
|
|
</description>
|
|
|
|
<!-- UnusedPrivateMethod -->
|
|
<exclude-pattern>.*/CommonPlayerLink.*</exclude-pattern>
|
|
<!-- RedundantFieldInitializer -->
|
|
<exclude-pattern>.*/FloodgateConfig.*</exclude-pattern>
|
|
<!-- CloseResource, there is no shutdown event and it has to load classes on the fly -->
|
|
<exclude-pattern>.*/PlayerLinkLoader.*</exclude-pattern>
|
|
<!-- PreserveStackTrace -->
|
|
<exclude-pattern>.*/FloodgateHandshakeHandler.*</exclude-pattern>
|
|
|
|
<rule ref="category/java/bestpractices.xml/MissingOverride" />
|
|
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
|
|
<rule ref="category/java/bestpractices.xml/UseTryWithResources" />
|
|
|
|
<rule ref="category/java/errorprone.xml/CloseResource" />
|
|
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions" />
|
|
|
|
<!-- got a bit lazy, just added whole sections and excluded some unnecessary ones -->
|
|
<rule ref="category/java/bestpractices.xml">
|
|
<!-- maybe add these ones back later on -->
|
|
<exclude name="AvoidPrintStackTrace" />
|
|
<exclude name="GuardLogStatement" />
|
|
</rule>
|
|
<rule ref="category/java/errorprone.xml">
|
|
<exclude name="AvoidDuplicateLiterals" />
|
|
<exclude name="AvoidLiteralsInIfCondition" /><!-- Some things just don't change :shrug: -->
|
|
<exclude name="AvoidFieldNameMatchingMethodName" />
|
|
<exclude name="BeanMembersShouldSerialize" />
|
|
<exclude name="UseProperClassLoader" />
|
|
</rule>
|
|
<rule ref="category/java/performance.xml">
|
|
<exclude name="AvoidUsingShortType" />
|
|
<exclude name="AvoidInstantiatingObjectsInLoops" /><!-- this is ok to some extend -->
|
|
<exclude name="InefficientStringBuffering" />
|
|
</rule>
|
|
<rule ref="category/java/security.xml" />
|
|
|
|
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
|
|
<properties>
|
|
<property name="allowWhile" value="true" />
|
|
</properties>
|
|
</rule>
|
|
</ruleset> |