Greater Than / Less Than : Complexity / Cognitive Complexity

Hi All,

Have been reading : Metric Definitions | SonarQube Docs

I can see when adding a condition there are two rules:

Greater Than / Less Than.

However, the value’s set are Not Percentages! Could someone provide a page that details out what each condition should take for a metric or explain it to me?

Example:

Complexity - I cannot understand what number would be used here

Cognitive Complexity - same as above, i cannot understand what would be used here. The link given to the supporting document throws a 404

Hi,

You really shouldn’t use complexity measures in a Quality Gate. They’re quantitative, not qualitative. This is very much the same as not using, e.g., Lines of Code in a Quality Gate.

“Then why does it show up in the list?” you ask. Well… let’s call it a combination of laziness and inertia.

 
HTH,
Ann