Breaking Point of Blocker / Critical / High Issues

Trend Metric Trend Metrics / Debt

The breaking point of a set of issues is the debt (estimated cost-to-fix) divided by the annual interest (estimated yearly cost-to-not-fix): the point in time when not fixing costs as much as fixing. Documentation: https://www.ndepend.com/docs/technical-debt#BreakingPoint

CQLinq source

This trend metric 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="Breaking Point of Blocker / Critical / High Issues" Unit="years"/>
let issues = Issues.Where(i => i.Severity.EqualsAny(Severity.Blocker, Severity.Critical, Severity.High))
select (issues.Sum(i =>i.Debt).BreakingPoint(issues.Sum(i =>i.AnnualInterest))).TotalYears()

// <Desc>
// The **breaking point** of a set of issues is the **debt** (estimated
// cost-to-fix) divided by the **annual interest** (estimated yearly
// cost-to-**not**-fix): the point in time when not fixing costs as much as
// fixing. Documentation:
// https://www.ndepend.com/docs/technical-debt#BreakingPoint
// </Desc>

Trend Metrics / Debt: all 7 items