https://github.com/bitjson/cppcheck-extension
Runs the cppcheck static code analyzer from vscode
https://github.com/bitjson/cppcheck-extension
Last synced: 11 months ago
JSON representation
Runs the cppcheck static code analyzer from vscode
- Host: GitHub
- URL: https://github.com/bitjson/cppcheck-extension
- Owner: bitjson
- License: mit
- Created: 2017-04-27T22:11:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T22:48:32.000Z (almost 9 years ago)
- Last Synced: 2025-03-25T03:42:04.942Z (11 months ago)
- Language: TypeScript
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# cppcheck README
This extension utilizes the cppcheck static code analyzer to provide C and C++ code analysis within Visual Studio Code.
## Features
- Run cppcheck for a single file.
- Run cppcheck for the entire workspace.
- On the fly linting within the code editor.

## Requirements
Cppcheck must be installed. Any version may be used. The extension will try to locate the `cppcheck` executable if possible. On Windows, it will search
the 32-bit Program Files directory. On Linux and macOS, several bin directories will be searched.
If `cppcheck` is not found, `cppcheck.cppcheckPath` must be set to the correct location of the executable.
### Windows Installation
Cppcheck is available for download at [`cppcheck.sourceforge.net`](http://cppcheck.sourceforge.net/).
### Ubuntu Installation
For Ubuntu users, Cppcheck is available via `apt-get`.
```sh
sudo apt-get install cppcheck
```
### macOS Installation
For macOS users, Cppcheck can most easily be installed using [Homebrew](https://brew.sh/).
```sh
brew install cppcheck
```
## Extension Settings
* `cppcheck.enable`: Enable/disable the analyzer.
* `cppcheck.cppcheckPath`: The path to the cppcheck executable.
* `cppcheck.includePaths`: The paths to any include directories.
* `cppcheck.platform`: The compilation platform. This determines data types and sizes (e.g. sizeof(int)).
* `cppcheck.standard`: The language standard to use (e.g. c++11).
* `cppcheck.define`: Symbols to define for the preprocessor.
* `cppcheck.undefine`: Symbols to undefine for the preprocessor.
* `cppcheck.suppressions`: Any cppcheck rules to suppress (see the cppcheck manual).
* `cppcheck.verbose`: Enable verbose output from cppcheck.
* `cppcheck.showStatusBarItem`: Show/hide the status bar item for displaying analyzer commands.
* `cppcheck.lintingEnabled`: Whether to enable automatic linting for C/C++ code. Linting runs on workspace changes and file saves.
## Release Notes
### 0.0.4
- Added linting directly to the code editor.
- Linting is listed in the Problems view for all files in the workspace.
### 0.0.3
- Added a new setting to automatically show the output channel after running cppcheck (true by default).
- Fix for issue #1 (Doesn't do anything).
### 0.0.2
- Updated to use the logo from cppcheck (as generously provided by Daniel Marjamäki), instead of blue on white.
- Added links to the cppcheck website and manual.
- Added a command for opening the cppcheck manual on the web.
### 0.0.1
- Initial release of cppcheck extension.