config/pmd/ruleset.xml (62 lines of code) (raw):
<?xml version="1.0"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<ruleset name="pmd ruleset">
<description>
Apache Spark Kubernetes Operator Ruleset
</description>
<rule ref="category/java/bestpractices.xml">
<exclude name="JUnitAssertionsShouldIncludeMessage" />
<exclude name="JUnitTestContainsTooManyAsserts" />
</rule>
<rule ref="category/java/codestyle.xml">
<exclude name="AtLeastOneConstructor" />
<exclude name="CommentDefaultAccessModifier" />
<exclude name="FieldNamingConventions" />
<exclude name="GenericsNaming" />
<exclude name="LocalVariableCouldBeFinal" />
<exclude name="LongVariable" />
<exclude name="MethodArgumentCouldBeFinal" />
<exclude name="OnlyOneReturn" />
<exclude name="ShortVariable" />
<exclude name="TooManyStaticImports" />
<exclude name="UseUnderscoresInNumericLiterals" />
</rule>
<rule ref="category/java/design.xml">
<exclude name="AbstractClassWithoutAnyMethod" />
<exclude name="AvoidCatchingGenericException" />
<exclude name="CognitiveComplexity" />
<exclude name="CyclomaticComplexity" />
<exclude name="ExcessiveImports" />
<exclude name="LawOfDemeter" />
<exclude name="NPathComplexity" />
<exclude name="TooManyMethods" />
</rule>
<rule ref="category/java/documentation.xml">
<exclude name="CommentRequired" />
<exclude name="CommentSize" />
</rule>
<rule ref="category/java/errorprone.xml">
<exclude name="AssignmentInOperand" />
<exclude name="AvoidCatchingThrowable" />
<exclude name="AvoidDuplicateLiterals" />
<exclude name="AvoidFieldNameMatchingMethodName" />
<exclude name="AvoidLiteralsInIfCondition" />
<exclude name="CloseResource" />
<exclude name="ConstructorCallsOverridableMethod" />
<exclude name="MissingSerialVersionUID" />
<exclude name="NullAssignment" />
<exclude name="TestClassWithoutTestCases" />
<exclude name="UseLocaleWithCaseConversions" />
<exclude name="UseProperClassLoader" />
</rule>
<rule ref="category/java/multithreading.xml">
<exclude name="DoNotUseThreads" />
<exclude name="UseConcurrentHashMap" />
</rule>
<rule ref="category/java/performance.xml">
<exclude name="AvoidFileStream" />
<exclude name="AvoidInstantiatingObjectsInLoops" />
<exclude name="RedundantFieldInitializer" />
</rule>
<rule ref="category/java/security.xml"/>
<!-- exclude on generated files -->
<exclude-pattern>.*/src/generated/.*</exclude-pattern>
</ruleset>