18

I am now engaged with emacs prelude and find everything nice. But

A lot of flycheck warnings are displayed while editing el file

and syntax coloring is overrided

Warnings like "the first line shoud be of form package --- summary"

How to turn off those warnings?

Community
  • 1
  • 1
jilen
  • 5,633
  • 3
  • 35
  • 84

2 Answers2

34

These are Checkdoc warnings. To disable these, add emacs-lisp-checkdoc to the option flycheck-disabled-checkers, either with the following code in your init file

(with-eval-after-load 'flycheck
  (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)))

or via the customize interface with M-x customize-variable RET flycheck-disabled-checkers.

  • thanks guy! Checkdoc seems too much for me. That's what i am looking for – jilen Mar 22 '13 at 03:05
  • Hi, how can I delete multi checkers from flycheck-checkers? – goofansu Jul 28 '13 at 04:07
  • 1
    @goofansu Uhm, well, just do the above for each checker you want to remove?! Or use customize and untick all these checkers, if you don't know Emacs Lisp. –  Jul 28 '13 at 07:00
  • @lunaryorn Thank you. I'll customize it. – goofansu Jul 28 '13 at 09:52
  • 3
    @goofansu Please note, that starting with the upcoming Flycheck 0.16 (or the latest MELPA packages), you should reset `flycheck-checkers` to its standard value and customize `flycheck-disabled-checkers` instead. See the updated answer for details. –  Dec 13 '13 at 12:57
  • The second expression is missing a quote: (eval-after-load 'flycheck '(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))) – Hugo Nov 24 '14 at 11:21
  • @Hugo Thanks. I updated the answer to use `with-eval-after-load`, and also removed all outdated information about `flycheck-checkers`. –  Nov 24 '14 at 13:17
  • Does it also covers `.emacs` file? – alper Jun 05 '20 at 23:15
7

If you wish to disable a particular Flycheck just for this one file, you can also use a file-local variable definition.

You can do this interactively while in the file's buffer by typing

  M-x add-file-local-variable flycheck-disabled-checkers RET
  (emacs-lisp-checkdoc)

which will add a local variables section to the end of the file.

;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)
;; End:

This is like customizing flycheck-disabled-checkers but only for the file.

This can also be customized on the level of the directory. http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Directory-Variables

Joe Oswald
  • 139
  • 1
  • 5