Public undocumented API” vs Source-viewer (Sonar 5.1.1)
This post has NOT been accepted by the mailing list yet.
I need to use the “Public types, methods and fields (API) should be documented with Javadoc” rule for one of my projects, and I found out that there is a little difference between the “Public undocumented API” measure and the source-viewer itself.
Here is how to reproduce this behavior:
a) Start Sonar 5.1.1
b) Create a new Profile “Public API Profile”
c) Add the rule “Public types, methods and fields (API) should be documented with Javadoc” in “Public API Profile” with severity Major
d) Set as default “Public API Profile”
e) Checkout Apache Httpclient 4.4 (svn co https://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.4)
f) cd 4.4
g) Comment “apache-rat-plugin” in pom.xml
h) mvn clean install
i) mvn sonar:sonar
j) When I access the “Public undocumented API” measure, it’s indicate 2 violations for the file InputStreamBody.java BUT the source-viewer shows 4 violations.
Is there a bug in the “Public undocumented API” measure or is this the expected behavior?