flycheck / flycheck-google-cpplint

Google C++ Style checker for Flycheck
GNU General Public License v3.0
42 stars 11 forks source link

googlelint filter not working #4

Open tahsinH opened 9 years ago

tahsinH commented 9 years ago

In my emacs even though I have the following '(flycheck-googlelint-filter "-whitespace/line_length) '(flycheck-googlelint-linelength "120")

I am still getting messages that Line length should be <=80 It seems the fillter settings are not honored.

These are the steps that I have performed so far.

This is what I have in my emacs

(eval-after-load 'flycheck
  '(progn
     (require 'flycheck-google-cpplint)
      (flycheck-add-next-checker 'c/c++-googlelint 'append)))
(custom-set-variables
   '(flycheck-disable-checker c/c++-gcc)    
   '(flycheck-c/c++-googlelint-executable "/usr/local/bin/cpplint")
   '(flycheck-googlelint-filter "-whitespace/line_length"))
jclosure commented 6 years ago

Try this. It works:

(use-package flymake-cursor
  :ensure t)
(use-package flymake-google-cpplint
  :ensure t
  :init
  :config
  (add-hook 'c-mode-hook 'flymake-google-cpplint-load)
  (add-hook 'c++-mode-hook 'flymake-google-cpplint-load)
  (custom-set-variables
   '(flymake-google-cpplint-command "/usr/local/bin/cpplint")
   '(flymake-google-cpplint-verbose "--verbose=0")
   '(flymake-google-cpplint-filter "--filter=-whitespace/line_length,-build")))

Setting verbose to 0, made it work for me.