flycheck-google-cpplint
flycheck-google-cpplint copied to clipboard
googlelint filter not working
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.
- I have successfully installed cpplint, I ran through command line
- I have successfully installed flycheck-google-cpplint
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"))
- for some reason, flycheck thinks gcc is my default syntax checker. so , first I thought flycheck-disable-checker will work. That did not, so I basically change the syntax checker at startup manually using M-x flycheck-select-checker RET c/c++-googlelint I think another user https://github.com/flycheck/flycheck-google-cpplint/issues/1 ran into same issues
- I also downloaded the cpplint.py again, and put in different location. Please, note this time I used the cpplint.py and not cpplint '(flycheck-c/c++-googlelint-executable "~/cpplint.py")
- but with all that fixed, it still seems the filters are still picking up default settings. And not my setup, of default line length/ whitespace etc.
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.