Skip to content

Commit f65c8c3

Browse files
authored
fix #39/remove references to extension property standard (#41)
* fix #39/remove references to extension property standard * removed reference to property in readme
1 parent 04caea3 commit f65c8c3

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ This extension contributes the following settings under `cppcheck-official.*`:
2929

3030
- **`cppcheck-official.enable`**: (boolean) Enable or disable the extension.
3131
- **`cppcheck-official.minSeverity`**: (string) Minimum severity to report (`info`, `warning`, or `error`). `info` shows style, performance, portability and information messages.
32-
- **`cppcheck-official.standard`**: (string) Sets the C/C++ standard with `--std=<id>` (e.g. `c11`, `c++17`).
3332
- **`cppcheck-official.arguments`**: (string) Additional [command line arguments](https://cppcheck.sourceforge.io/manual.pdf?#page=5) to pass to `cppcheck`.
3433
- **`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`.
3534

src/extension.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ export function activate(context: vscode.ExtensionContext) {
114114
const isEnabled = config.get<boolean>("cppcheck-official.enable", true);
115115
const extraArgs = config.get<string>("cppcheck-official.arguments", "");
116116
const minSevString = config.get<string>("cppcheck-official.minSeverity", "info");
117-
const standard = config.get<string>("cppcheck-official.standard", "c++20");
118117
const userPath = config.get<string>("cppcheck-official.path")?.trim() || "";
119118
const commandPath = userPath ? resolvePath(userPath) : "cppcheck";
120119

@@ -140,7 +139,6 @@ export function activate(context: vscode.ExtensionContext) {
140139
commandPath,
141140
extraArgs,
142141
minSevString,
143-
standard,
144142
diagnosticCollection
145143
);
146144
}
@@ -191,7 +189,6 @@ async function runCppcheckOnFileXML(
191189
commandPath: string,
192190
extraArgs: string,
193191
minSevString: string,
194-
standard: string,
195192
diagnosticCollection: vscode.DiagnosticCollection
196193
): Promise<void> {
197194
// Clear existing diagnostics for this file
@@ -200,7 +197,6 @@ async function runCppcheckOnFileXML(
200197
// Replace backslashes (used in paths in Windows environment)
201198
const filePath = document.fileName.replaceAll('\\', '/');
202199
const minSevNum = parseMinSeverity(minSevString);
203-
const standardArg = standard !== "<none>" ? `--std=${standard}` : "";
204200

205201
// Resolve paths for arguments where applicable
206202
const extraArgsParsed = (extraArgs.split(" ")).map((arg) => {
@@ -221,7 +217,6 @@ async function runCppcheckOnFileXML(
221217
'--suppress=missingInclude',
222218
'--suppress=missingIncludeSystem',
223219
`--file-filter=${filePath}`,
224-
standardArg,
225220
...extraArgsParsed,
226221
].filter(Boolean);
227222
proc = cp.spawn(commandPath, args, {
@@ -235,7 +230,6 @@ async function runCppcheckOnFileXML(
235230
'--suppress=unusedFunction',
236231
'--suppress=missingInclude',
237232
'--suppress=missingIncludeSystem',
238-
standardArg,
239233
...extraArgsParsed,
240234
filePath,
241235
].filter(Boolean);

0 commit comments

Comments
 (0)