cppcheck

Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
Apr 11, 2018
16 089
Cppcheck plugin for CLion.

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

Usage:
  • Install the cppcheck tool using directions on its homepage. This plugin does not bundle the cppcheck tool itself, which must be installed separately.
  • Install this cppcheck plugin into CLion
  • Configure the plugin with the absolute path to the cppcheck executable into the 'cppcheck path' configuration field
    • Windows
      • File | Settings | cppcheck configuration
      • Usually the path is C:\Program Files (x86)\Cppcheck\cppcheck.exe
    • macOS
      • CLion | Preferences | cppcheck configuration
      • In a terminal run `which cppcheck` to find the path to cppcheck. If you installed it with Homebrew, the path will be /usr/local/bin/cppcheck
    • Linux
      • File | Settings | cppcheck configuration
      • In a terminal run `which cppcheck` to find the path to cppcheck. If you installed it with your system's package manager, it is probably located at /usr/bin/cppcheck

    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 leave --language=c++ appended to the cppcheck options.

Download plugin

Recent change notes

1.2.0 Greatly improve plugin responsiveness to changes by using virtual files to interact with cppcheck.