From 4a943dc5490de749b50dc694e783ba146b1210dd Mon Sep 17 00:00:00 2001 From: davidramnero Date: Mon, 15 Jun 2026 11:10:44 +0200 Subject: [PATCH 1/4] feature / #55 getting started walkthrough pop up on installation --- package.json | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/package.json b/package.json index ae792a1..211c971 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,43 @@ } } } + ], + "walkthroughs": [ + { + "id": "cppcheck-official.gettingStarted", + "title": "Get Started with Cppcheck", + "description": "Learn the basics of using cppcheck in VS Code with the official extension", + "steps": [ + { + "id": "step1", + "title": "Connect extension to your cppcheck executable", + "description": "Open the extension settings. Set the path to your cppcheck executable in the `path` property. \n[Set path](command:workbench.action.openSettings?%5B%22cppcheck-official.path%22%5D)", + "media": { + "image": "images/cppcheck_path.png", + "altText": "image showing where to find the cppcheck path property" + }, + "completionEvents": ["onSettingChanged:cppcheck-official.path"] + }, + { + "id": "step2", + "title": "Try out the extension", + "description": "Open a .c or .cpp file and save it. If cppcheck detects any issues these will show up in the problems tab in the bottom of your VS Code window.", + "media": { + "image": "images/check_result2.png", + "altText": "image showing cppcheck warnings in problems tab" + } + }, + { + "id": "step3", + "title": "Customize settings", + "description": "Cppcheck works best for you if you set it up according to your needs. You may i.e. want to disable certain kinds of warnings, and if you have cppcheck premium you will need to set this up for it to work in this extension. All of this is done through the extension property 'arguments', with the different flags or arguments available being detailed in the [official cppcheck documentation](https://files.cppchecksolutions.com/manual.pdf). \n[Set up arguments](command:workbench.action.openSettings?%5B%22cppcheck-official.arguments%22%5D)", + "media": { + "image": "images/project_file.png", + "altText": "image showing cppcheck warnings in problems tab" + } + } + ] + } ] }, "scripts": { From 4ad0b8418ce724e37994dee61e2bbd9ae4085360 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Mon, 15 Jun 2026 11:11:50 +0200 Subject: [PATCH 2/4] corrected alt text --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 211c971..c7b4155 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "description": "Open a .c or .cpp file and save it. If cppcheck detects any issues these will show up in the problems tab in the bottom of your VS Code window.", "media": { "image": "images/check_result2.png", - "altText": "image showing cppcheck warnings in problems tab" + "altText": "image showing project file path being set in arguments property" } }, { From 54ad2db5cedea216bad173cf5e35b7ddd86c5508 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Mon, 15 Jun 2026 22:42:32 +0200 Subject: [PATCH 3/4] moved text to markdown fields, added configurearguments command, expanded walkthrough text --- package.json | 21 +++++++++------------ src/extension.ts | 14 ++++++++++++++ walkthrough/arguments.md | 12 ++++++++++++ walkthrough/path.md | 5 +++++ walkthrough/test.md | 5 +++++ 5 files changed, 45 insertions(+), 12 deletions(-) create mode 100644 walkthrough/arguments.md create mode 100644 walkthrough/path.md create mode 100644 walkthrough/test.md diff --git a/package.json b/package.json index c7b4155..87f4286 100644 --- a/package.json +++ b/package.json @@ -82,31 +82,28 @@ { "id": "step1", "title": "Connect extension to your cppcheck executable", - "description": "Open the extension settings. Set the path to your cppcheck executable in the `path` property. \n[Set path](command:workbench.action.openSettings?%5B%22cppcheck-official.path%22%5D)", + "description": "", "media": { - "image": "images/cppcheck_path.png", - "altText": "image showing where to find the cppcheck path property" + "markdown": "walkthrough/path.md" }, "completionEvents": ["onSettingChanged:cppcheck-official.path"] }, { "id": "step2", - "title": "Try out the extension", - "description": "Open a .c or .cpp file and save it. If cppcheck detects any issues these will show up in the problems tab in the bottom of your VS Code window.", + "title": "Customize settings", + "description": "", "media": { - "image": "images/check_result2.png", - "altText": "image showing project file path being set in arguments property" + "markdown": "walkthrough/arguments.md" } }, { "id": "step3", - "title": "Customize settings", - "description": "Cppcheck works best for you if you set it up according to your needs. You may i.e. want to disable certain kinds of warnings, and if you have cppcheck premium you will need to set this up for it to work in this extension. All of this is done through the extension property 'arguments', with the different flags or arguments available being detailed in the [official cppcheck documentation](https://files.cppchecksolutions.com/manual.pdf). \n[Set up arguments](command:workbench.action.openSettings?%5B%22cppcheck-official.arguments%22%5D)", + "title": "Try out the extension", + "description": "", "media": { - "image": "images/project_file.png", - "altText": "image showing cppcheck warnings in problems tab" + "markdown": "walkthrough/test.md" } - } + } ] } ] diff --git a/src/extension.ts b/src/extension.ts index 9c0aad4..0a93382 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -68,6 +68,20 @@ function parseMinSeverity(str: string): SeverityNumber { // Your extension is activated the very first time the command is executed. export async function activate(context: vscode.ExtensionContext) { + // Register a command to push user to workspace settings from walkthrough + context.subscriptions.push( + vscode.commands.registerCommand( + 'cppcheck-official.configureArguments', + async () => { + console.log('configure arguments'); + await vscode.commands.executeCommand( + 'workbench.action.openWorkspaceSettings', + 'cppcheck-official.arguments' + ); + } + ) + ); + // Create a diagnostic collection. const diagnosticCollection = vscode.languages.createDiagnosticCollection("Cppcheck"); context.subscriptions.push(diagnosticCollection); diff --git a/walkthrough/arguments.md b/walkthrough/arguments.md new file mode 100644 index 0000000..1b8e93f --- /dev/null +++ b/walkthrough/arguments.md @@ -0,0 +1,12 @@ + + +Cppcheck works best for you if you set it up according to your needs. You may e.g. want to disable certain kinds of warnings, and if you have cppcheck premium you will need to set this up for it to work in this extension. All of this is done through the extension property 'arguments', with the different flags or arguments available being detailed in the [official cppcheck documentation](https://files.cppchecksolutions.com/manual.pdf). + +It is recommended to set up these settings in the workspace settings so that you and your team easily can work with the same set up. Furthermore you are likely to want to have the same settings between VS Code and your CI workflows. This is most easily done through project files, which are referenced from the argument setting (see [documentation](https://files.cppchecksolutions.com/manual.pdf) for how to create a project file). + +![image showing project file path being set in arguments property](../images/project_file.png) + +Another way of synching your set up between different environments is through using scripts. The argument property supports running scripts with the syntax `@(/path/to/script.sh)`. The extension expects this script to output what to use for arguments wrapped with `@()`, so e.g. `echo "@(--report-progress --enable=style --inconclusive --suppress=syntaxError)"`. + + +[Set up arguments](command:cppcheck-official.configureArguments) \ No newline at end of file diff --git a/walkthrough/path.md b/walkthrough/path.md new file mode 100644 index 0000000..af96119 --- /dev/null +++ b/walkthrough/path.md @@ -0,0 +1,5 @@ +![image showing where to find the cppcheck path property](../images/cppcheck_path.png) + +Open the extension settings. Set the path to your cppcheck executable in the `path` property. + +[Set path](command:workbench.action.openSettings?%5B%22cppcheck-official.path%22%5D) \ No newline at end of file diff --git a/walkthrough/test.md b/walkthrough/test.md new file mode 100644 index 0000000..cd52017 --- /dev/null +++ b/walkthrough/test.md @@ -0,0 +1,5 @@ +![Image showing cppcheck warnings in the problems tab.](../images/check_result2.png) + +Open a .c or .cpp file and save it. If cppcheck detects any issues these will show up in the problems tab in the bottom of your VS Code window. + +The extension is in continuous development, so if you find issues, have feature requests or some other kind of feedback we are happy to recieve it at the [Cppcheck Official github page](https://github.com/cppchecksolutions/vscode-cppcheck-official/issues). \ No newline at end of file From defbd4ca701b8d1dbfa146c7962df12c9ea1ce68 Mon Sep 17 00:00:00 2001 From: davidramnero Date: Tue, 16 Jun 2026 11:20:07 +0200 Subject: [PATCH 4/4] specify pages for documentation links --- src/extension.ts | 1 - walkthrough/arguments.md | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 0a93382..dfa32e2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -73,7 +73,6 @@ export async function activate(context: vscode.ExtensionContext) { vscode.commands.registerCommand( 'cppcheck-official.configureArguments', async () => { - console.log('configure arguments'); await vscode.commands.executeCommand( 'workbench.action.openWorkspaceSettings', 'cppcheck-official.arguments' diff --git a/walkthrough/arguments.md b/walkthrough/arguments.md index 1b8e93f..bdbe99a 100644 --- a/walkthrough/arguments.md +++ b/walkthrough/arguments.md @@ -1,8 +1,8 @@ -Cppcheck works best for you if you set it up according to your needs. You may e.g. want to disable certain kinds of warnings, and if you have cppcheck premium you will need to set this up for it to work in this extension. All of this is done through the extension property 'arguments', with the different flags or arguments available being detailed in the [official cppcheck documentation](https://files.cppchecksolutions.com/manual.pdf). +Cppcheck works best for you if you set it up according to your needs. You may e.g. want to disable certain kinds of warnings, and if you have cppcheck premium you will need to set this up for it to work in this extension. All of this is done through the extension property 'arguments', with the different flags or arguments available being detailed in the [official cppcheck documentation](https://files.cppchecksolutions.com/manual.pdf#page=13). -It is recommended to set up these settings in the workspace settings so that you and your team easily can work with the same set up. Furthermore you are likely to want to have the same settings between VS Code and your CI workflows. This is most easily done through project files, which are referenced from the argument setting (see [documentation](https://files.cppchecksolutions.com/manual.pdf) for how to create a project file). +It is recommended to set up these settings in the workspace settings so that you and your team easily can work with the same set up. Furthermore you are likely to want to have the same settings between VS Code and your CI workflows. This is most easily done through project files, which are referenced from the argument setting (see [documentation](https://files.cppchecksolutions.com/manual.pdf#page=4) for how to create a project file). ![image showing project file path being set in arguments property](../images/project_file.png)