- Notifications
You must be signed in to change notification settings - Fork17
Code Climate Engine for Cppcheck
License
antiagainst/codeclimate-cppcheck
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
codeclimate-cppcheck is a Code Climate engine that wrapsCppcheck.You can run it on your command line using the Code Climate CLI, or on ourhosted analysis platform.
Cppcheck is a static analysis tool for C/C++ code.
- If you haven't already,install the Code Climate CLI.
- [optional] Run
codeclimate engines:install cppcheckto install the CodeClimate Cppcheck engine. - Configure your
.codeclimate.ymlfile. See example below. - You're ready to analyze! Browse into your project's folder and run
codeclimate analyze. If you skipped step 2, the Cppcheck engine willautomatically be installed at this point, assuming it's enabled in.codeclimate.yml.
Like thecppcheck command line tool itself, you can configure variousaspects of the static analysis. Right now, the following options are supportedin.codeclimate.yml:
check: issue categories to check.By default, no additional checks are enabled.Available values are:all,warning,style,performance,portability,information,unusedFunction, etc.Refer to the--enable=option ofcppcheckfor more information.project: use Visual Studio project/solution (*.vcxproj/*sln) or compiledatabase (compile_commands.json) for files to analyse, include paths,defines, platform and undefines.Refer to the--project=option ofcppcheckfor more information.language: forcescppcheckto check all files as the given language.Valid values are:c,c++.Refer to the--language=option ofcppcheckfor more information.stds: multiple language standards to check against.Refer to the--std=option ofcppcheckfor more information.platform: specifies platform specific types and sizes. Available builtinplatforms are:unix32,unix64,win32A,win32W,win64, etc.Refer to the--platform=option ofcppcheckfor more information.library: specifies librarycfgfiles to be loaded. Refer to the--library=option ofcppcheckfor more information.jobs: specifies the number of jobs for execution Refer to the-j <jobs>option ofcppcheckfor more information.dump: create dump files during execution.Refer to the--dumpoption ofcppcheckfor more information.defines: define preprocessor symbols.Refer to the-Doption ofcppcheckfor more information.undefines: undefine preprocessor symbols.Refer to the-Uoption ofcppcheckfor more information.includes: paths for searching include files. First given path is searchedfor contained header files first. If paths are relative to source files,this is not needed.Refer to the-Ioption ofcppcheckfor more information.max_configs: maximum number of configurations to check in a file beforeskipping it. Default is 12.max_configscan also be set toforce, whichforcescppcheckto check all configs.Refer to the--max-configs=and--forceoptions ofcppcheckfor moreinformation.inconclusive: allow reporting issues that are not inconclusive.Refer to the--inconclusiveoption ofcppcheckfor more information.suppressions-list: suppress warnings listed in the file.Refer to the--suppressions-listoption ofcppcheckfor more information.inline-suppr: allow suppression of warnings with inline comments,for example:// cppcheck-suppress arrayIndexOutOfBounds.Refer to the--inline-supproption ofcppcheckfor more information
Additional options may be supported later.
An example.codeclimate.yml file:
version:"2"plugins:cppcheck:enabled:trueconfig:check:allproject:compile_commands.jsonlanguage:c++stds: -c++11platform:unix64defines: -"DEBUG=1" -"__cplusplus"undefines: -"DEBUG"includes: -include/max_configs:42inconclusive:falsedump:falsedump:falsesuppressions-list:.cppcheck-suppressionsinline-suppr:truejobs:4library:googletest
For help withCppcheck, check out their documentation.
If you're running into a Code Climate issue, first look over this project'sGitHub Issues, as your question may have already been covered.If not,go ahead and open a support ticket with us.
About
Code Climate Engine for Cppcheck
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.