[doc] CommentRequired - doc changed behavior

This commit is contained in:
Andreas Dangel
2023-04-27 20:37:54 +02:00
parent daf574a888
commit 157cac9218
3 changed files with 41 additions and 0 deletions

View File

@ -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>