Cyclomatic complexity become 11. #954

This commit is contained in:
Roman Ivanov 2015-06-15 22:45:32 -07:00
parent d88c251ae4
commit a5dcfb66cb
1 changed files with 3 additions and 2 deletions

View File

@ -22,14 +22,15 @@
<rule ref="rulesets/java/codesize.xml/CyclomaticComplexity">
<properties>
<property name="showClassesComplexity" value="false"/>
<property name="reportLevel" value="12"/>
<property name="reportLevel" value="11"/>
<!-- validateCli is not reasonbale to split as incapsulation of logic will be damaged
getDetails - huge Switch, it has to be monolitic
JavadocMethodCheck, JavadocStyleCheck, JavadocUtils.getJavadocTags() - deprecated
FinalLocalVariableCheck.visitToken() - it is just big switch , not could be done
GenericWhitespaceCheck.processSingleGeneric() - it contains a lot of similar to each other and very simple condition
VariableDeclarationUsageDistanceCheck, CustomImportOrderCheck - it is not OK to have such a complicated logic need to be refactored.
-->
<property name="violationSuppressXPath" value="//MethodDeclaration[@Name='validateCli' and ../../..[@Image='Main']] | //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']"/>
<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/TooManyMethods">