(filePath: string, rootPath?: string)
| 102 | } |
| 103 | |
| 104 | export function normalizeHealthLookupKey(filePath: string, rootPath?: string): string { |
| 105 | const normalized = filePath.replace(/\\/g, '/').replace(/^\.\//, ''); |
| 106 | if (!rootPath) { |
| 107 | return normalized; |
| 108 | } |
| 109 | const normalizedRoot = rootPath.replace(/\\/g, '/').replace(/\/$/, ''); |
| 110 | if (normalized.startsWith(normalizedRoot)) { |
| 111 | return normalized.slice(normalizedRoot.length).replace(/^\//, ''); |
| 112 | } |
| 113 | return normalized; |
| 114 | } |
| 115 | |
| 116 | export function indexHealthByFile( |
| 117 | artifact: CodebaseHealthArtifact | null, |
no outgoing calls
no test coverage detected