(finding: ArchitectureHotspot)
| 15 | } |
| 16 | const positive = (value?: number) => value !== undefined && Number.isFinite(value) && value > 0 ? value : 0; |
| 17 | const score = (finding: ArchitectureHotspot) => hotspotScore({ ...finding, fanIn: positive(finding.fanIn), complexity: positive(finding.complexity), cognitive: positive(finding.cognitive), loopDepth: positive(finding.loopDepth) }); |
| 18 | export const hotspotIdentity = (finding: ArchitectureHotspot) => `${finding.qualifiedName ?? finding.name}@${finding.filePath ?? ''}:${finding.line ?? ''}`; |
| 19 | const identity = hotspotIdentity; |
| 20 | const compare = (a: string, b: string) => a < b ? -1 : a > b ? 1 : 0; |
no test coverage detected