Fix rules
This commit is contained in:
@ -1656,8 +1656,8 @@ your API.
|
||||
<property name="xpath">
|
||||
<value>
|
||||
<![CDATA[
|
||||
//MethodDeclaration[@Public = 'true']/MethodDeclarator/FormalParameters[
|
||||
count(FormalParameter/Type/ReferenceType/ClassOrInterfaceType[@Image = 'String' and @Array = 'false']) > 3
|
||||
//MethodDeclaration[@Public=true()]/MethodDeclarator/FormalParameters[
|
||||
count(FormalParameter/Type/ReferenceType/ClassOrInterfaceType[@Image = 'String' and @Array=false()]) > 3
|
||||
]
|
||||
]]>
|
||||
</value>
|
||||
|
@ -2416,7 +2416,7 @@ may indicate problematic behaviour. Empty cases are ignored as these indicate an
|
||||
+ count(BlockStatement//Statement/ContinueStatement)
|
||||
+ count(BlockStatement//Statement/ThrowStatement)
|
||||
+ count(BlockStatement//Statement/IfStatement[@Else= true() and Statement[2][ReturnStatement|ContinueStatement|ThrowStatement]]/Statement[1][ReturnStatement|ContinueStatement|ThrowStatement])
|
||||
+ count(SwitchLabel[name(following-sibling::node()) = 'SwitchLabel'])
|
||||
+ count(SwitchLabel[ following-sibling::node()[1][self::SwitchLabel] ])
|
||||
+ count(SwitchLabel[count(following-sibling::node()) = 0])
|
||||
< count (SwitchLabel))]
|
||||
]]>
|
||||
|
@ -33,6 +33,8 @@ import net.sourceforge.pmd.lang.rule.XPathRule;
|
||||
*/
|
||||
public class XPathMetricFunctionTest {
|
||||
|
||||
// TODO 7.0 when removing jaxen these tests need to be updated to use pmd-java:metric
|
||||
|
||||
private static final String VIOLATION_MESSAGE = "violation";
|
||||
|
||||
@org.junit.Rule
|
||||
|
Reference in New Issue
Block a user