NDepend.API Documentation
DebtRatio Method (IIssuesSet)
NDepend.Issue Namespace > IIssuesSet Interface : DebtRatio Method
The code element on which we infer the percentage of debt.
Estimate the ratio of technical debt, measured through AllDebtIn(ICodeElement)(codeElement). This ratio is expressed in percentage, of estimated debt, compared to the estimated time it would take to rewrite codeElement from scratch.
Syntax

Parameters

codeElement
The code element on which we infer the percentage of debt.
Exceptions
ExceptionDescription
Thrown if the codeElement doesn't belong to CodeBase.
Remarks
This method implementation calls this.DebtFormatter.NDepend.TechnicalDebt.IDebtFormatter.ToDebtRatio and returns null if NDepend.TechnicalDebt.IDebtFormatter.ToDebtRatio returns null, which happens when the PDB file is not found for the assembly containing codeElement, which means that NDepend.CodeModel.ExtensionMethodsHelpers.GetNbLinesOfCode_GuaranteedIfPDBFound returns null.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IIssuesSet Interface
IIssuesSet Members