Custom Quality Gates


I’m just wondering if there are any guides written on how the custom quality profiles/gates work, specifically when adding a condition for a metric (say Cognitive Complexity) and setting a threshold what the threshold is measured against (i.e. per file, per class, per method, per function?) and what is the industry consensus on a descent threshold value for the metric.

Any insight on how the conditions are applied would be great.


1 Like

Hi Darren,

there is at least the documentation here:

The built-in quality gate and quality profiles are designed to work for most use cases out of the box.

More specifically for the cognitive complexity: it is not checked through measure but through a rule (search for S3776) which checks that methods don’t exceed 15.

1 Like