加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pmd.xml 4.06 KB
一键复制 编辑 原始数据 按行查看 历史
Nepxion 提交于 2020-09-26 21:27 . 修改代码质量脚本
<?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 助手
尝试更多
代码解读
代码找茬
代码优化