Public API Doc% - Inconsistency in computation SQ6.7.7

We are using SonarQube - Version 6.7.7 (build 38951)
We have migrated from old SQ Version 5.6.7 form which we have extended the Quality Gates.
‘Public Documented API (%)’ is one of the QG parameter we still have in current SQ6.7.7.

In one of our application which has both java & cpp files, the Public API Doc% value is found inconsistent.
All java files has proper API Doc & hence it is shown 100% at file level. The only cpp file is shown 0% at file level. However, at overall project level it is shwoing 0% and the QG is failed.

My queries are:

  1. Is the ‘Public Documented API (%)’ functioning properly in SQ6.7.7? Specifically in the case of an application with both java & cpp files?
  2. I read ‘Public Documented API (%)’ is depricated. If so, why SQ6.7.7 is allowing us to set it as QG parameter?

I would really appreciate response for my queries.

Thank you!


That metric has been deprecated, meaning ‘on the way out’ for quite a while. I believe (but my memory is foggy) that the CFamily analyzer dropped it early, and the Java analyzer dropped it much later. That would explain why you get the value for one language and not the other.

Why does the server still offer the metric, then? Because it’s only deprecated in 6.7, not dropped. Sorry, but your best course it to just go ahead and drop that condition from your Quality Gate.