Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion Gogland DataGrip Rider Android Studio
5 108
cppcheck plugin for CLion.

Runs cppcheck on the fly while you write code.
Highlights lines and displays cppcheck error messages.
Supports passing options to cppcheck.

Install the Cppcheck analysis tool ( not bundled with this plugin).
Install the cppcheck plugin.
File -> Settings -> Other Settings -> cppcheck configuration.
Fill in the absolute path of the cppcheck executable (e.g. C:\Program Files (x86)\Cppcheck\cppcheck.exe, /usr/bin/cppcheck, etc).

Known issues:
Cppcheck is not designed to be run on header files (.h) directly, as must be done for this plugin, and as a result may have false positives.
When run on header files directly, Cppcheck defaults to C as the language, which will generate false positives for C++ projects. C++ projects should append --language=c++ to the cppcheck options.

Download plugin

Recent change notes

1.0.7 Avoid drawing errors in .cpp and .c files from header files they import.
1.0.6 Fix NullPointerException when opening files with no extension.
1.0.5 Add warning about header file false positives for C++ projects.
1.0.4 Fix highlighting prepended whitespace.
1.0.3 Highlight line corresponding to severity.