Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

googlelint filter not working #4

Open
tahsinH opened this issue Mar 5, 2015 · 1 comment
Open

googlelint filter not working #4

tahsinH opened this issue Mar 5, 2015 · 1 comment

Comments

@tahsinH
Copy link

tahsinH commented Mar 5, 2015

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 Can't Configure it Correctly #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.
@jclosure
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants