(input: SymbolRiskInput)
| 217 | * else is exactly the case this predicate has to answer no to. |
| 218 | */ |
| 219 | export function hasComplexityReadings(input: SymbolRiskInput): boolean { |
| 220 | return measured(input.cyclomatic) !== undefined |
| 221 | || measured(input.cognitive) !== undefined |
| 222 | || measured(input.transitiveLoopDepth) !== undefined |
| 223 | || input.allocInLoop !== undefined |
| 224 | || input.linearScanInLoop !== undefined |
| 225 | || input.unguardedRecursion !== undefined; |
| 226 | } |
| 227 | |
| 228 | export function completenessOf(inputs: readonly SymbolRiskInput[]): RiskInputCompleteness { |
| 229 | let measuredCount = 0; |
no test coverage detected