forked from phoedos/pmd
[java] SwitchStmtsShouldHaveDefault: use new PatternLabel attribute
This commit is contained in:
parent
e37f82b62d
commit
6c35c73919
@ -1177,9 +1177,11 @@ class SomeTestClass {
|
|||||||
<properties>
|
<properties>
|
||||||
<property name="xpath">
|
<property name="xpath">
|
||||||
<value><![CDATA[
|
<value><![CDATA[
|
||||||
//SwitchStatement[@DefaultCase = false() and @ExhaustiveEnumSwitch = false()]
|
//SwitchStatement
|
||||||
|
[@DefaultCase = false()]
|
||||||
|
[@ExhaustiveEnumSwitch = false()]
|
||||||
(: exclude pattern tests - for these, the compiler will ensure exhaustiveness :)
|
(: exclude pattern tests - for these, the compiler will ensure exhaustiveness :)
|
||||||
[not(*/SwitchLabel/(TypePattern|RecordPattern))]
|
[*/SwitchLabel[@PatternLabel = false()]]
|
||||||
]]></value>
|
]]></value>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user