diff --git a/README.md b/README.md index 81d278f..c49a51d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ This extension contributes the following settings under `cppcheck-official.*`: - **`cppcheck-official.enable`**: (boolean) Enable or disable the extension. - **`cppcheck-official.minSeverity`**: (string) Minimum severity to report (`info`, `warning`, or `error`). `info` shows style, performance, portability and information messages. -- **`cppcheck-official.standard`**: (string) Sets the C/C++ standard with `--std=` (e.g. `c11`, `c++17`). - **`cppcheck-official.arguments`**: (string) Additional [command line arguments](https://cppcheck.sourceforge.io/manual.pdf?#page=5) to pass to `cppcheck`. - **`cppcheck-official.path`**: (string) Path to the `cppcheck` executable. If left empty, `cppcheck` from the system PATH is used. Supports paths relative to workspace folder on the formats `./RELATIVE_PATH`, `../RELATIVE_PATH` or `${workspaceFolder}/RELATIVE_PATH`. diff --git a/src/extension.ts b/src/extension.ts index 971dc01..8ae8503 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -113,7 +113,6 @@ 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++20"); const userPath = config.get("cppcheck-official.path")?.trim() || ""; const commandPath = userPath ? resolvePath(userPath) : "cppcheck"; @@ -139,7 +138,6 @@ export function activate(context: vscode.ExtensionContext) { commandPath, extraArgs, minSevString, - standard, diagnosticCollection ); } @@ -190,7 +188,6 @@ async function runCppcheckOnFileXML( commandPath: string, extraArgs: string, minSevString: string, - standard: string, diagnosticCollection: vscode.DiagnosticCollection ): Promise { // Clear existing diagnostics for this file @@ -199,7 +196,6 @@ async function runCppcheckOnFileXML( // Replace backslashes (used in paths in Windows environment) const filePath = document.fileName.replaceAll('\\', '/'); const minSevNum = parseMinSeverity(minSevString); - const standardArg = standard !== "" ? `--std=${standard}` : ""; // Resolve paths for arguments where applicable const extraArgsParsed = (extraArgs.split(" ")).map((arg) => { @@ -220,7 +216,6 @@ async function runCppcheckOnFileXML( '--suppress=missingInclude', '--suppress=missingIncludeSystem', `--file-filter=${filePath}`, - standardArg, ...extraArgsParsed, ].filter(Boolean); proc = cp.spawn(commandPath, args, { @@ -234,7 +229,6 @@ async function runCppcheckOnFileXML( '--suppress=unusedFunction', '--suppress=missingInclude', '--suppress=missingIncludeSystem', - standardArg, ...extraArgsParsed, filePath, ].filter(Boolean);