forked from phoedos/pmd
[doc] CommentRequired - doc changed behavior
This commit is contained in:
@ -532,4 +532,33 @@ public class CommentRequirement {}
|
||||
public class CommentRequirement {}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>Method overridden without @Override (#3123)</description>
|
||||
<rule-property name="methodWithOverrideCommentRequirement">Required</rule-property>
|
||||
<expected-problems>1</expected-problems>
|
||||
<expected-linenumbers>4</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
/** Comment */
|
||||
public class CommentRequirement {
|
||||
//no @Override annotation
|
||||
public String toString() { // comment required
|
||||
return "";
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>Methods inside annotations (#3123)</description>
|
||||
<expected-problems>2</expected-problems>
|
||||
<expected-linenumbers>3,4</expected-linenumbers>
|
||||
<code><![CDATA[
|
||||
/** Comment */
|
||||
@interface MyAnnotation1 {
|
||||
String name(); // comment required
|
||||
int version(); // comment required
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
</test-data>
|
||||
|
Reference in New Issue
Block a user