diff --git a/README.md b/README.md index c49a51d..2936778 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ # Cppcheck Official + **Cppcheck Official** is a Visual Studio Code extension that runs [cppcheck](https://cppcheck.sourceforge.io/) against C/C++ files upon save and reports any warnings or errors in the Problems panel. +![GIF showing example of warnings output from cppcheck](./images/check_result.gif) + ## Features - **On-save linting**: When you save a c/cpp file, `cppcheck` is automatically run on that file. - **Per-file diagnostics**: Only diagnostics relevant to the saved file are displayed. - **Configurable severity threshold**: Filter out messages below a chosen severity level (`info`, `warning`, or `error`). -- **Set C/C++ standard**: Easily specify `--std=` (e.g. `c++17`, `c99`, etc.). - **Diagnostic cleanup**: When you close a file, its diagnostics are automatically cleared. -- **Project file support**: You can feed your project file to cppcheck through the `--project` flag in the `cppcheck-official.arguments` field in the extension settings. +- **Project file support**: You can feed your project file to cppcheck through the `--project` flag in the `cppcheck-official.arguments` field in the extension settings. (See GIF below) +![GIF showing where to set up project file](./images/project_file.gif) - **Warning notes**: Display notes for warnings when those are available +- **Warning type suppression**: Suppress warnings with comments on the form `// cppcheck suppress >warning type<`. Cppcheck also warns about unmatched suppressions. +![GIF showing how to suppress warnings](./images/suppression.gif) ## Requirements @@ -18,6 +23,8 @@ - By default, this extension looks for `cppcheck` on the system PATH. - Alternatively, specify a custom executable path using the `cppcheck-official.path` setting. +![GIF showing location of path setting](./images/cppcheck_path.gif) + Examples of installing Cppcheck: - On Linux (Debian/Ubuntu), install via `sudo apt-get install cppcheck`. - On macOS with Homebrew: `brew install cppcheck`. diff --git a/images/check_result.gif b/images/check_result.gif new file mode 100644 index 0000000..a76ff0e Binary files /dev/null and b/images/check_result.gif differ diff --git a/images/cppcheck_path.gif b/images/cppcheck_path.gif new file mode 100644 index 0000000..cf545e2 Binary files /dev/null and b/images/cppcheck_path.gif differ diff --git a/images/project_file.gif b/images/project_file.gif new file mode 100644 index 0000000..e6856e3 Binary files /dev/null and b/images/project_file.gif differ diff --git a/images/suppression.gif b/images/suppression.gif new file mode 100644 index 0000000..ca3c489 Binary files /dev/null and b/images/suppression.gif differ