Cppcheck Visual Studio

broken image


Cppcheck for windows

Features

  1. Run cppcheck for the current cpp file in editor
  2. Get all the issues with higher severity than the setting
  3. Run cppcheck for the cpp files in the fold of current file
  4. Each change on current file will trigger the execution of cppcheck for the file.
  5. Output cppcheck results in CppcheckReport channel of Output window

Requirements

Please install cppcheck tool on OS first!!!website is http://cppcheck.sourceforge.net/All the cppcheck reports are dependent on execution of cppcheck executable file.

Extension Settings

Include if your extension adds any VS Code settings through the contributes.configuration extension point.

For example:

This extension contributes the following settings:

  • cppcheck.isEnable: enable/disable this extension
  • cppcheck.severity: set to error, warning,style,performance,portability, or information.

Known Issues

Release Notes

0.0.1

Initial release of cppcheckext

0.0.2

Get all the issues with higher severity than the setting

Contact

If you have any issues report them at Issues

License

Copyright (C) 2019 Ron ZhongLicensed under the MIT License.

Source

VisualStudio You can run Cppcheck on individual project files (.vcxproj) or on a whole solution(.sln) RunningCppcheckonanentireVisualStudiosolution.

Cppcheck Cmake

Visual Studio C Project Property Page to setup Pre-Build Event Now you can provide argument to exclude directory (like any third party code etc.) from scan. Cppcheck -project=$ (MSBuildProjectFullPath) -i '$ (ProjectDir)foo src ' -output-file='$ (OutDir)$ (TargetName).xml'. Cppcheck: Running clang-tidy on visual studio projects in windows Here are some screenshots when running clang-tidy on visual studio projects in windows. Visual Studio solution #1. I have a semi-large Visual Studio solution, with a series of different build configurations, and various platforms. I really only want to check one or two configurations, on a single platform. However, I don't see a way in the CppCheck manual to select a build configuration when you use the -project flag.





broken image