/flycheck-cstyle

Integrate flycheck with cstyle in Emacs

Primary LanguageEmacs Lisp

Flycheck CStyle Checker

License GPL 3 MELPA Build Status

Integrate cstyle with flycheck to automatically check the style of your C/C++ code on the fly.

Installation

MELPA

The preferred way to install flycheck-cstyle is via MELPA - then you can just M-x package-install RET flycheck-cstyle RET

To enable then simply add the following to your init file:

(eval-after-load 'flycheck
  '(progn
     (require 'flycheck-cstyle)
     (flycheck-cstyle-setup)
     ;; chain after cppcheck since this is the last checker in the upstream
     ;; configuration
     (flycheck-add-next-checker 'c/c++-cppcheck '(warning . cstyle))))

If you do not use cppcheck then chain after whichever checker you do use (ie. clang / gcc / irony etc)

(flycheck-add-next-checker 'c/c++-clang '(warning . cstyle))

Manual

If you would like to install the package manually, download or clone it and place within Emacs' load-path, then you can require it in your init file like this:

(require 'flycheck-cstyle)
(flycheck-cstyle-setup)

NOTE: This will also require the manual installation of flycheck if you have not done so already.

License

Copyright © 2015 Alex Murray

Distributed under GNU GPL, version 3.