This linter plugin for SublimeLinter provides an interface to cppcheck. It will be used with files that have the "C++" or "C" syntax.
SublimeLinter must be installed in order to use this plugin.
Please use Package Control to install the linter plugin.
Before using this plugin, ensure that cppcheck
is installed on your system.
To install cppcheck
, do one of the following:
-
Install
cppcheck
from your favorite package manager:<package manager> install cppcheck
-
For Windows, you can download a copy from the official site of cppcheck.
Once cppcheck
is installed, ensure it is in your system PATH so that SublimeLinter can find it.
The docs cover troubleshooting PATH configuration.
- SublimeLinter settings: http://sublimelinter.com/en/latest/settings.html
- Linter settings: http://sublimelinter.com/en/latest/linter_settings.html
Additional SublimeLinter-cppcheck settings:
Setting | Description |
---|---|
std | Set the language standard used. |
enable | A comma-delimited list of checks to enable. Defaults to style . |
For enable
, you can use a single string (ex: "style,unusedFunction"
), or an array of strings if not inline (ex: ["style", "unusedFunction"]
).
For std
, you can use a single string for a single value, but you have to use an array of strings for multiple values (ex. ["c89", "c99"]
), which means you can't use multiple values in inline settings.