suppression rules for NPathComplexity. #953

This commit is contained in:
Roman Ivanov 2015-06-15 23:33:51 -07:00
parent d0d9220e28
commit 1634289dd3
1 changed files with 8 additions and 2 deletions

View File

@ -15,8 +15,6 @@
<exclude name="ModifiedCyclomaticComplexity"/>
<!-- we are using CyclomaticComplexity -->
<exclude name="StdCyclomaticComplexity"/>
<!-- till #953 -->
<exclude name="NPathComplexity"/>
</rule>
<rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
@ -33,6 +31,14 @@
<property name="violationSuppressXPath" value="//MethodDeclaration[@Name='validateCli' and ../../..[@Image='Main']] | //MethodDeclaration[@Name='processSingleGeneric' and ../../..[@Image='GenericWhitespaceCheck']] | //MethodDeclaration[@Name='visitToken' and ../../..[@Image='FinalLocalVariableCheck']] | //MethodDeclaration[@Name='getJavadocTags' and ../../..[@Image='JavadocUtils']] | //MethodDeclaration[@Name='getDetails' and ../../..[@Image='RightCurlyCheck']] | //ClassOrInterfaceDeclaration[@Image='JavadocMethodCheck' or @Image='JavadocStyleCheck' or @Image='VariableDeclarationUsageDistanceCheck' or @Image='CustomImportOrderCheck']"/>
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml/NPathComplexity">
<properties>
<!-- JavadocMethodCheck - deprecated
WhitespaceAroundCheck.isNotRelevantSituation - till #953
-->
<property name="violationSuppressXPath" value="//MethodDeclaration[@Name='isNotRelevantSituation' and ../../..[@Image='WhitespaceAroundCheck']] | //MethodDeclaration[@Name='validateCli' and ../../..[@Image='Main']] | //ClassOrInterfaceDeclaration[@Image='JavadocMethodCheck' or @Image='JavadocStyleCheck']"/>
</properties>
</rule>
<rule ref="rulesets/java/codesize.xml/TooManyMethods">
<properties>
<property name="maxmethods" value="20"/>