From 07c2d4b49a449a4973038474fbc914de814ac754 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Tue, 19 May 2026 18:38:23 +0200 Subject: [PATCH] fix/ #53 vscode variables arent correctly substituted --- src/extension.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index ed7e3bb..b978d0d 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -91,6 +91,11 @@ export async function activate(context: vscode.ExtensionContext) { const commandPath = userPath ? resolvePath(userPath) : "cppcheck"; var args = config.get("cppcheck-official.arguments", ""); + // Expand ${workspaceFolder}, we have to do this here to disambiguate the ${} command syntax + if (args.includes("${workspaceFolder}")) { + args = args.replaceAll("${workspaceFolder}", findWorkspaceRoot()); + } + var processedArgs = ''; // If argument field contains command to run script we do so here if (args.includes('${')) {