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>
|
||||
<property name="xpath">
|
||||
<value><![CDATA[
|
||||
//SwitchStatement[@DefaultCase = false() and @ExhaustiveEnumSwitch = false()]
|
||||
//SwitchStatement
|
||||
[@DefaultCase = false()]
|
||||
[@ExhaustiveEnumSwitch = false()]
|
||||
(: exclude pattern tests - for these, the compiler will ensure exhaustiveness :)
|
||||
[not(*/SwitchLabel/(TypePattern|RecordPattern))]
|
||||
[*/SwitchLabel[@PatternLabel = false()]]
|
||||
]]></value>
|
||||
</property>
|
||||
</properties>
|
||||
|
Loading…
x
Reference in New Issue
Block a user