MCPcopy Index your code
hub / github.com/coder/coder / deduplicateDiagnostics

Function deduplicateDiagnostics

site/scripts/check-compiler.mjs:111–119  ·  view source on GitHub ↗
(diagnostics)

Source from the content-addressed store, hash-verified

109 * compilation, so we deduplicate before reporting.
110 */
111export function deduplicateDiagnostics(diagnostics) {
112 const seen = new Set();
113 return diagnostics.filter((d) => {
114 const key = `${d.line}:${d.short}`;
115 if (seen.has(key)) return false;
116 seen.add(key);
117 return true;
118 });
119}
120
121/**
122 * Run the React Compiler over a single file and return the number of

Callers 2

compileFileFunction · 0.85

Calls 2

filterMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected