From 70945926cbf1e4d101f2c3890665f877c986f763 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Wed, 5 Aug 2026 16:15:54 +0200 Subject: [PATCH] hotfix/code actions applied to all diagnostics regardless of source --- src/util/codeActions.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/codeActions.ts b/src/util/codeActions.ts index 5aff427..0435e84 100644 --- a/src/util/codeActions.ts +++ b/src/util/codeActions.ts @@ -14,6 +14,11 @@ export class CodeActionProvider implements vscode.CodeActionProvider { const actions: vscode.CodeAction[] = []; for (const diagnostic of context.diagnostics) { + // Only provide these code actions for cppcheck errors + if (diagnostic.source !== 'cppcheck') { + continue; + } + var diagnosticCode = diagnostic.code; if (typeof(diagnosticCode) === "object" && typeof(diagnosticCode) !== null) { diagnosticCode = diagnosticCode.value;