( artifact: CodebaseHealthArtifact | null, rootPath?: string )
| 114 | } |
| 115 | |
| 116 | export function indexHealthByFile( |
| 117 | artifact: CodebaseHealthArtifact | null, |
| 118 | rootPath?: string |
| 119 | ): Map<string, CodebaseHealthFile> { |
| 120 | const map = new Map<string, CodebaseHealthFile>(); |
| 121 | if (!artifact) return map; |
| 122 | for (const fileHealth of artifact.files) { |
| 123 | map.set(normalizeHealthLookupKey(fileHealth.file, rootPath), fileHealth); |
| 124 | } |
| 125 | return map; |
| 126 | } |
no test coverage detected