Answered on the user mailing-list. See http://sonar.15.x6.nabble.com/The-rule-undocumentedapi-doesn-t-exclude-some-getter-methods-td5015058.html
The squid's rule "undocumentedapi" doesn't exclude some getter methods
-
04-06-2022 - |
Domanda
we are using sonar 3.6.1 and we are trying to use the rule "UndocumentedAPI". Normally, this rule excludes all the getter. But, it seems that classes whose getter use the prefix 'this' are always included in the analysis.
I made a testcase :
public class TestDocumentedAPIDTO {
private Long id;
private String name;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
}
After analysing this class, I can see that the method getName()
throws the UndocumentedAPI violation.
How can I fix that ? is it a bug ?
Thanks for your help
Regards
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow