forked from spoutdev/Spout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.xml
executable file
·43 lines (39 loc) · 1.22 KB
/
rules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0"?>
<ruleset>
<rule name="NotYetWrittenCode"
message="Replace default method implementation with valid implementation."
class="net.sourceforge.pmd.rules.XPathRule">
<description>
Eclipse and NetBeans place generic implementations in classes for methods that are required by parent abstract classes and parent interfaces.
</description>
<properties>
<property name="xpath">
<value>
<![CDATA[
//AllocationExpression[ClassOrInterfaceType[@Image="UnsupportedOperationException"]
and
./Arguments/ArgumentList/Expression/PrimaryExpression/PrimaryPrefix/Literal[
contains(@Image,"Not supported yet") or
contains(@Image,"Not implemented yet")]]
]]>
</value>
</property>
</properties>
<priority>3</priority>
<example>
<![CDATA[
public class Foo {
public void notSupportedYet() {
throw new UnsupportedOperationException("Not supported yet."); //Fix this!
}
public void notImplementedYet() {
throw new UnsupportedOperationException("Not implemented yet"); //Fix this!
}
public void validUsage() {
throw new UnsupportedOperationException("This won't work ever."); //Valid usage.
}
}
]]>
</example>
</rule>
</ruleset>