All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.danilopianini.javaqa.pmd.xml Maven / Gradle / Ivy

The newest version!
<?xml version="1.0"?>
<ruleset name="Ruleset by Danilo Pianini"
         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.github.io/schema/ruleset_2_0_0.xsd">
    <description>Rules selected by Danilo Pianini</description>
    <rule ref="category/java/bestpractices.xml">
        <exclude name="AccessorClassGeneration" />
        <exclude name="AccessorMethodGeneration" />
        <exclude name="ConstantsInInterface" />
        <exclude name="GuardLogStatement" />
        <exclude name="UnitTestAssertionsShouldIncludeMessage" />
        <exclude name="UnitTestContainsTooManyAsserts" />
        <exclude name="UnitTestShouldIncludeAssert" />
        <exclude name="OneDeclarationPerLine" />
        <exclude name="UseVarargs" />
    </rule>
    <rule ref="category/java/bestpractices.xml/AvoidReassigningLoopVariables">
        <properties>
            <property name="foreachReassign" value="deny" />
            <property name="forReassign" value="allow" />
        </properties>
    </rule>
    <rule ref="category/java/bestpractices.xml/LooseCoupling">
        <properties>
            <property
                name="allowedTypes"
                value="
                    com.google.common.collect.ImmutableCollection,
                    com.google.common.collect.ImmutableList,
                    com.google.common.collect.ImmutableMap,
                    com.google.common.collect.ImmutableSet,
                    java.util.Properties
                "
            />
        </properties>
    </rule>
    <rule ref="category/java/codestyle.xml">
        <exclude name="AtLeastOneConstructor" />
        <exclude name="AvoidUsingNativeCode" />
        <exclude name="CallSuperInConstructor" />
        <exclude name="CommentDefaultAccessModifier" />
        <exclude name="ConfusingTernary" />
        <exclude name="EmptyMethodInAbstractClassShouldBeAbstract" />
        <exclude name="LongVariable" />
        <exclude name="MDBAndSessionBeanNamingConvention" />
        <exclude name="OnlyOneReturn" />
        <exclude name="ShortClassName" />
        <exclude name="ShortMethodName" />
        <exclude name="ShortVariable" />
        <exclude name="TooManyStaticImports" />
        <exclude name="UseExplicitTypes" />
    </rule>
    <rule ref="category/java/codestyle.xml/ClassNamingConventions">
        <properties>
            <property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]+" />
        </properties>
    </rule>
    <rule ref="category/java/design.xml">
        <exclude name="AbstractClassWithoutAnyMethod" />
        <exclude name="AvoidDeeplyNestedIfStmts" />
        <exclude name="CognitiveComplexity" />
        <exclude name="CouplingBetweenObjects" />
        <exclude name="CyclomaticComplexity" />
        <exclude name="DataClass" />
        <exclude name="ExcessiveImports" />
        <exclude name="ExcessiveParameterList" />
        <exclude name="ExcessivePublicCount" />
        <exclude name="GodClass" />
        <exclude name="LawOfDemeter" />
        <exclude name="LoosePackageCoupling" />
        <exclude name="NcssCount" />
        <exclude name="NPathComplexity" />
        <exclude name="SwitchDensity" />
        <exclude name="TooManyFields" />
        <exclude name="TooManyMethods" />
        <exclude name="UseObjectForClearerAPI" />
    </rule>
    <rule ref="category/java/documentation.xml">
        <exclude name="CommentRequired" />
        <exclude name="CommentSize" />
        <exclude name="UncommentedEmptyMethodBody" />
    </rule>
    <rule ref="category/java/errorprone.xml">
        <exclude name="AvoidFieldNameMatchingMethodName" />
        <exclude name="AvoidLiteralsInIfCondition" />
        <exclude name="CloseResource" />
        <exclude name="DoNotTerminateVM" />
        <exclude name="ImplicitSwitchFallThrough" />
        <exclude name="NonSerializableClass" />
        <exclude name="NonStaticInitializer" />
        <exclude name="NullAssignment" />
        <exclude name="TestClassWithoutTestCases" />
        <exclude name="UseProperClassLoader" />
    </rule>
    <rule ref="category/java/multithreading.xml">
        <exclude name="AvoidSynchronizedAtMethodLevel" />
        <exclude name="AvoidSynchronizedStatement" />
        <exclude name="AvoidUsingVolatile" />
        <exclude name="DoNotUseThreads" />
        <exclude name="UseConcurrentHashMap" />
    </rule>
    <rule ref="category/java/performance.xml">
        <exclude name="AvoidFileStream" />
        <exclude name="AvoidInstantiatingObjectsInLoops" />
        <exclude name="TooFewBranchesForSwitch" />
    </rule>
    <rule ref="category/java/security.xml">
    </rule>
</ruleset>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy