fix(lsp-gate): lint-tagged diagnostics never fail a stage (#311)

tsserver tags TS6133 (unused import) Unnecessary, but a tsconfig with
noUnusedLocals promotes it to error severity — which hard-failed whole
runs no rewrite could clear. Carry LSP DiagnosticTag through the
LspDiagnostic event and gate on untagged errors only; lint diagnostics
stay recorded and visible.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 21:16:33 +04:00
parent c32445b8a8
commit f61864ff1d
4 changed files with 38 additions and 2 deletions
@@ -132,6 +132,7 @@ class Lsp4jDiagnosticsRunner(
severity = diagnostic.severity?.name?.lowercase() ?: "error",
code = diagnostic.code?.let { if (it.isLeft) it.left else it.right.toString() },
message = diagnostic.message,
tags = diagnostic.tags.orEmpty().map { it.name.lowercase() },
)
}
}