Skip to content

flymake/flymake-cppcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: I recommend that you use the flycheck. Because, you can run the checker more than one. Of course, including cppcheck.

License: GPL v3

flymake-cppcheck.el

CI

Cppcheck for Emacs with flymake-mode.

To use Cppcheck with Emacs, you will need Cppcheck installed.

You should be able to run

$ cppcheck

and, you'll also need to install flymake-easy.

Usage

You'll need to add the directory containing flymake-cppcheck.el to your load-path.

If not, also add to your config

(add-to-list 'load-path "~/.emacs.d/path/to/flymake-cppcheck.el")

Add to your Emacs config

(require 'flymake-cppcheck)
(add-hook 'c-mode-hook 'flymake-cppcheck-load)
(add-hook 'c++-mode-hook 'flymake-cppcheck-load)

Enable messages

By default only error messages are shown. Through the command more checks can be enabled.

(custom-set-variables
 '(flymake-cppcheck-enable "all"))

multi:

(custom-set-variables
 '(flymake-cppcheck-enable "warning,performance,information,style"))
  • warning
  • performance
  • information
  • style
  • unusedFunction
  • all

cppcheck command location

By default, the location of the cppcheck command is searched.

(custom-set-variables
 '(flymake-cppcheck-command "/path/to/cppcheck"))

Where to create temporary copy

one of 'tempdir or 'inplace (default).

(custom-set-variables
 '(flymake-cppcheck-location 'tempdir))

For more informations

Please refer to official document.