From 7e5c072419a1ce584c8cbf0239e41e95703dc133 Mon Sep 17 00:00:00 2001 From: Alexander Ott <66271487+AlexanderHott@users.noreply.github.com> Date: Thu, 19 Feb 2026 14:34:34 -0800 Subject: [PATCH] remove space from line label so they are clickable --- packages/react-doctor/src/scan.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/react-doctor/src/scan.ts b/packages/react-doctor/src/scan.ts index 517631f..e406468 100644 --- a/packages/react-doctor/src/scan.ts +++ b/packages/react-doctor/src/scan.ts @@ -102,8 +102,13 @@ const printDiagnostics = (diagnostics: Diagnostic[], isVerbose: boolean): void = const fileLines = buildFileLineMap(ruleDiagnostics); for (const [filePath, lines] of fileLines) { - const lineLabel = lines.length > 0 ? `: ${lines.join(", ")}` : ""; - logger.dim(` ${filePath}${lineLabel}`); + if (lines.length > 0) { + for (const line of lines) { + logger.dim(` ${filePath}:${line}`); + } + } else { + logger.dim(` ${filePath}`); + } } } @@ -137,8 +142,13 @@ const formatRuleSummary = (ruleKey: string, ruleDiagnostics: Diagnostic[]): stri sections.push("", "Files:"); for (const [filePath, lines] of fileLines) { - const lineLabel = lines.length > 0 ? `: ${lines.join(", ")}` : ""; - sections.push(` ${filePath}${lineLabel}`); + if (lines.length > 0) { + for (const line of lines) { + sections.push(` ${filePath}:${line}`); + } + } else { + sections.push(` ${filePath}`); + } } return sections.join("\n") + "\n";