Quality Gates Evolution
Shows quality gates evolution between baseline and now. Gates relying on diff (like New Debt since Baseline) have no evolution available. Double-click a quality gate for editing.
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.
// <Name>Quality Gates Evolution</Name>
from qg in QualityGates
let qgBaseline = qg.OlderVersion()
let relyOnDiff = qgBaseline == null
let evolution = (relyOnDiff || qgBaseline.Value == null) ? TrendIcon.None :
// When a quality gate relies on diff between now and baseline
// it is not executed against the baseline
qg.ValueDiff() == 0d ?
TrendIcon.Constant :
(qg.ValueDiff() > 0 ?
( qg.MoreIsBad ? TrendIcon.RedUp: TrendIcon.GreenUp) :
(!qg.MoreIsBad ? TrendIcon.RedDown: TrendIcon.GreenDown))
select new { qg,
// BaselineStatus = relyOnDiff? (QualityGateStatus?) null : qgBaseline.Status,
Status = qg.Status,
Evolution = evolution,
BaselineValue = relyOnDiff? " " : qgBaseline.ValueString,
Value = qg.ValueString,
}
// <Desc>
// Shows quality gates evolution between baseline and now. Gates relying on
// diff (like *New Debt since Baseline*) have no evolution available.
// Double-click a quality gate for editing.
// </Desc>
Open in the interactive Rules Explorer · All default rules
Quality Gates: all 19 items
- Quality Gates Evolution
- Percentage Coverage
- Percentage Coverage on New Code
- Percentage Coverage on Refactored Code
- Percentage Coverage (JustMyCode)
- Percentage Coverage on New Code (JustMyCode)
- Percentage Coverage on Refactored Code (JustMyCode)
- Blocker Issues
- Critical Issues
- New Blocker / Critical / High Issues
- Critical Rules Violated
- Treat Compiler Warnings as Error
- Percentage Debt
- Debt
- New Debt since Baseline
- Debt Rating per Namespace
- Annual Interest
- New Annual Interest since Baseline
- Unnecessary NDepend SuppressMessageAttribute Usage