From 5984a6fcfe88a8e809528bdff49b1b7f87c35980 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Tue, 18 Nov 2025 12:51:09 +0100 Subject: [PATCH] fix #17: remove standard as setting + remove xml version 2 flag --- package.json | 16 ---------------- src/extension.ts | 4 +--- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/package.json b/package.json index 32553ed..2be40ea 100644 --- a/package.json +++ b/package.json @@ -52,22 +52,6 @@ ], "default": "info", "description": "Minimum severity of issues to report (info, warning, or error)." - }, - "cppcheck-official.standard": { - "type": "string", - "enum": [ - "", - "c89", - "c99", - "c11", - "c++03", - "c++11", - "c++14", - "c++17", - "c++20" - ], - "default": "c++20", - "description": "C/C++ standard to use for cppcheck (`--std=`). Select `` to specify it in `cppcheck-official.arguments` or let `cppcheck` use its default setting." } } }, diff --git a/src/extension.ts b/src/extension.ts index 16ddb2f..5629a6e 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -96,7 +96,7 @@ export function activate(context: vscode.ExtensionContext) { const isEnabled = config.get("cppcheck-official.enable", true); const extraArgs = config.get("cppcheck-official.arguments", ""); const minSevString = config.get("cppcheck-official.minSeverity", "info"); - const standard = config.get("cppcheck-official.standard", "c++17"); + const standard = config.get("cppcheck-official.standard", "c++20"); const userPath = config.get("cppcheck-official.path")?.trim() || ""; const commandPath = userPath ? resolvePath(userPath) : "cppcheck"; @@ -197,7 +197,6 @@ async function runCppcheckOnFileXML( const args = [ '--enable=all', '--xml', - '--xml-version=2', '--suppress=unusedFunction', '--suppress=missingInclude', '--suppress=missingIncludeSystem', @@ -210,7 +209,6 @@ async function runCppcheckOnFileXML( const args = [ '--enable=all', '--xml', - '--xml-version=2', '--suppress=unusedFunction', '--suppress=missingInclude', '--suppress=missingIncludeSystem',