(path: string | undefined)
| 74 | export function collectSourceMetrics(graph: GraphData, knownFiles: string[] = []): SourceCatalog { |
| 75 | const files = new Map<string, FileMeasure>(); |
| 76 | const addFile = (path: string | undefined) => { |
| 77 | if (!path || path === '{}') return undefined; |
| 78 | const key = pathKey(path); |
| 79 | if (!files.has(key)) files.set(key, { path: key, language: sourceLanguage(key), connection: 'unknown' }); |
| 80 | return files.get(key)!; |
| 81 | }; |
| 82 | for (const path of knownFiles) addFile(path); |
| 83 | const represented = new Set<string>(); |
| 84 | for (const node of graph.nodes) { |
no test coverage detected