# Quality Gates Fail

Quality Gate Trend Metrics / Quality Gates

Counts active quality gates that fail. Without a baseline, gates relying on diff are not counted, which can explain an unexpected slight decrease of this count.

CQLinq source

This quality gate is written in CQLinq, C# LINQ over the NDepend code model. It ships with every new NDepend project: you can read it, adapt it, or use it as a starting point for your own custom rules.

// <TrendMetric Name="# Quality Gates Fail" Unit="quality gates"/>
from qualityGate in QualityGates
where qualityGate.Fail
select new { 
   qualityGate , 
   qualityGate.ValueString, 
}

//<Desc>
// Counts active quality gates that fail. Without a baseline, gates relying
// on diff are not counted, which can explain an unexpected slight decrease
// of this count.
//</Desc>

Trend Metrics / Quality Gates: all 3 items