<?xml version="1.0"?>
<ruleset
	name="BattleShip ruleset"
    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>BattleShip ruleset</description>
    <rule ref="category/java/bestpractices.xml">
    </rule>
    <rule ref="category/java/codestyle.xml">
        <exclude name="ShortVariable" />
        <exclude name="LongVariable" />
        <exclude name="ShortClassName" />
        <exclude name="OnlyOneReturn" />
        <exclude name="AtLeastOneConstructor" />
        <exclude name="UnnecessaryLocalBeforeReturn" />
    </rule>
    <rule ref="category/java/design.xml">
    	<exclude name="AvoidCatchingGenericException" />
    	<exclude name="AvoidRethrowingException" />
    	<exclude name="CognitiveComplexity" />
    	<exclude name="CyclomaticComplexity" />
    	<exclude name="DataClass" />
    	<exclude name="CouplingBetweenObjects" />
    	<exclude name="ExcessiveImports" />
    	<exclude name="SignatureDeclareThrowsException" />
    	<exclude name="CollapsibleIfStatements" />
    	<exclude name="AvoidThrowingRawExceptionTypes" />
    	<exclude name="NcssCount" />
    	<exclude name="GodClass" />
    	<exclude name="ExceptionAsFlowControl" />
    	<exclude name="NPathComplexity" />
    	<exclude name="NPathComplexity" />
    	<exclude name="SwitchDensity" />
    	<exclude name="LawOfDemeter" />
    	<exclude name="AvoidDeeplyNestedIfStmts" />
    	<exclude name="AvoidUncheckedExceptionsInSignatures" />
    	<exclude name="LoosePackageCoupling" />
    </rule>
   <rule ref="category/java/design.xml/TooManyMethods">
	    <properties>
	        <property name="maxmethods" value="40" />
	    </properties>
	</rule>
    <rule ref="category/java/errorprone.xml">
        <exclude name="NullAssignment" />
        <exclude name="AvoidLiteralsInIfCondition" />
        <exclude name="CloseResource" />
        <exclude name="AvoidDuplicateLiterals" />
    </rule>
    <rule ref="category/java/multithreading.xml">
        <!-- Rules for J2EE and EJB -->
        <exclude name="DoNotUseThreads" />
        <!-- Not documentated rule -->
        <exclude name="AvoidSynchronizedStatement" />
    </rule>
    <rule ref="category/java/performance.xml">
        <exclude name="AvoidInstantiatingObjectsInLoops" />
        <exclude name="TooFewBranchesForSwitch" />
    </rule>
    <rule ref="category/java/security.xml">
    </rule>
</ruleset>