Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
pmd.xml 4.06 KB
Copy Edit Raw Blame History
Nepxion authored 2021-07-04 14:48 . 修改代码质量脚本
<?xml version="1.0"?>
<ruleset name="Custom ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Exclude noisy rules.
</description>
<rule ref="rulesets/internal/all-java.xml">
<exclude name="AbstractNaming"/>
<exclude name="AddEmptyString"/>
<exclude name="AppendCharacterWithChar"/>
<exclude name="ArrayIsStoredDirectly"/>
<exclude name="AssignmentInOperand"/>
<exclude name="AtLeastOneConstructor"/>
<exclude name="AvoidCatchingGenericException"/>
<exclude name="AvoidDuplicateLiterals"/>
<exclude name="AvoidFieldNameMatchingMethodName"/>
<exclude name="AvoidFinalLocalVariable"/>
<exclude name="AvoidInstantiatingObjectsInLoops"/>
<exclude name="AvoidLiteralsInIfCondition"/>
<exclude name="AvoidPrefixingMethodParameters"/>
<exclude name="AvoidSynchronizedAtMethodLevel"/>
<exclude name="AvoidThrowingNullPointerException"/>
<exclude name="AvoidThrowingRawExceptionTypes"/>
<exclude name="AvoidUsingShortType"/>
<exclude name="BeanMembersShouldSerialize"/>
<exclude name="CallSuperInConstructor"/>
<exclude name="CommentRequired"/>
<exclude name="CommentSize"/>
<exclude name="CompareObjectsWithEquals"/>
<exclude name="ConfusingTernary"/>
<exclude name="CyclomaticComplexity"/>
<exclude name="DataflowAnomalyAnalysis"/>
<exclude name="DefaultPackage"/>
<exclude name="DoNotUseThreads"/>
<exclude name="DuplicateImports"/>
<exclude name="EmptyMethodInAbstractClassShouldBeAbstract"/>
<exclude name="ExcessiveImports"/>
<exclude name="ExcessivePublicCount"/>
<exclude name="FieldDeclarationsShouldBeAtStartOfClass"/>
<exclude name="ForLoopsMustUseBraces"/>
<exclude name="GodClass"/>
<exclude name="GuardDebugLogging"/>
<exclude name="GuardLogStatement"/>
<exclude name="GuardLogStatementJavaUtil"/>
<exclude name="IfStmtsMustUseBraces"/>
<exclude name="ImmutableField"/>
<exclude name="LawOfDemeter"/>
<exclude name="LocalVariableCouldBeFinal"/>
<exclude name="LoggerIsNotStaticFinal"/>
<exclude name="LongVariable"/>
<exclude name="LoosePackageCoupling"/>
<exclude name="MethodArgumentCouldBeFinal"/>
<exclude name="MethodReturnsInternalArray"/>
<exclude name="ModifiedCyclomaticComplexity"/>
<exclude name="NullAssignment"/>
<exclude name="OneDeclarationPerLine"/>
<exclude name="OnlyOneReturn"/>
<exclude name="PositionLiteralsFirstInComparisons"/>
<exclude name="PrematureDeclaration"/>
<exclude name="PreserveStackTrace"/>
<exclude name="RedundantFieldInitializer"/>
<exclude name="SignatureDeclareThrowsException"/>
<exclude name="SimpleDateFormatNeedsLocale"/>
<exclude name="SimplifyConditional"/>
<exclude name="ShortClassName"/>
<exclude name="ShortMethodName"/>
<exclude name="ShortMethodName"/>
<exclude name="ShortVariable"/>
<exclude name="StdCyclomaticComplexity"/>
<exclude name="TooManyFields"/>
<exclude name="TooManyMethods"/>
<exclude name="TooManyStaticImports"/>
<exclude name="UncommentedEmptyConstructor"/>
<exclude name="UncommentedEmptyMethodBody"/>
<exclude name="UnusedPrivateMethod"/>
<exclude name="UnnecessaryConstructor"/>
<exclude name="UnnecessaryLocalBeforeReturn"/>
<exclude name="UnnecessaryParentheses"/>
<exclude name="UseConcurrentHashMap"/>
<exclude name="UseCorrectExceptionLogging"/>
<exclude name="UseIndexOfChar"/>
<exclude name="UselessParentheses"/>
<exclude name="UseObjectForClearerAPI"/>
<exclude name="UseStringBufferForStringAppends"/>
<exclude name="UseUtilityClass"/>
<exclude name="UseVarargs"/>
<exclude name="ClassNamingConventions"/>
</rule>
<rule ref="rulesets/java/empty.xml/EmptyCatchBlock">
<properties>
<property name="allowCommentedBlocks" value="true"/>
</properties>
</rule>
</ruleset>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化