| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Cppcheck Official is a Visual Studio Code extension that runs cppcheck against C/C++ files upon save and reports any warnings or errors in the Problems panel.
Warning notes: Display notes for warnings when those are available
Dynamic config: The extension supports running a script to generate arguments to pass to cppcheck. This can be done by including the command in the argument field wrapped with @(), e.g. --suppress=memleak:src/file1.cpp @(bash path/to/script.sh). The script is expected to output the argument(s) wrapped with @(). If the script e.g. creates a project file it should print out as @(--project=path/to/projectfile.json). This output will be spliced into the argument string as such: --suppress=memleak:src/file1.cpp --project=path/to/projectfile.json.
Warning suppression: Warnings of a specific type can be supressed with the --suppress flag in the argument field in the extension settings. The extension also supports inline suppression for specific lines of code, simply write // cppcheck-suppress >warning id< (see image below). Suppressions can also be added through code actions, either as automatically generated inline suppressions or, if you are using a project file, as universal suppressions specified in your project file.

Cppcheck must be installed on your system.
Examples of installing Cppcheck:
This extension contributes the following settings under cppcheck-official.*:
Please submit any issues or feature requests via the GitHub Issues page.
This plugin is forked from the plugin cppcheck-lite by Justus Rijke (https://github.com/JustusRijke/Cppcheck-Lite).
| Back | FazBrowse Home | New Git URL |