I have activated this rule “Public types, methods and fields (API) should be documented with Javadoc” in my sonarqube. When I analyzed my project which should has contains javadoc, it doesn’t break the rule. So I try to create class which non compliant in the rule description and analyzed it again. But it still doesn’t break the group. Why is it? How to user this rule? Thank you
There are two parameters in this rule which define what set of classes the rule should be applied to. By default, classes in an “internal” (sub)package will be ignored, and classes in an “api” (sub)package will be scanned.
You should double-check your class’ package against these settings.