How to measure Class Coupling metric with SonarQube

Hello,

I have the 7.0.0.36138 SonarQube version.

I’m trying to find a way to measure the Class Coupling metric of a project with SonarQube.

I tried to look over all the possible measures of my project, but I couldn’t find the Class Coupling.

Thank you.

Hi,

Sorry, but that metric was dropped from SonarQube years ago.

 
Ann

Hello ,
@ganncamp
Didn’t quite get the full historical context on why this particular metrics were dropped for (eg:Java ). Depth of Inheritance and Class Coupling from the archive.

But are there alternative metrics which are available ?

regards
Anand

Hi Anand,

There are not.

 
Ann

Hi Ann,
Many thanks for the info… but may I ask why?
It was still in the Version 6.7 and maybe later… before that you dropped LCOM4, I think the justification was something around false positives… what was the motivation behind dropping afferent and efferent couplings?
I found these interesting and give a short introduction to Sonarqube in my company, so I’d like to be able to tell people why these have all been dropped without replacement, and maybe what else is deprecated!
Many thanks!
David

Hi David,

Welcome to the community!

Those metrics were dropped (a very long time ago now it seems to me) because very few people knew what to do with them. For the vast majority of people they were just noise.

 
HTH,
Ann

What are the current ways to use these Coupling metric? For example, some plugins?

Hi @_YaleChen,

Sorry, but I’m not aware of any plugins that supply these metrics.

 
Ann