Questions tagged [flycheck]

Flycheck is an on-the-fly syntax checking package for GNU Emacs 24, with in-buffer error highlighting, automatic background checking, a dynamic error list, and built-in support for over 40 programming and markup languages.

Flycheck is an on-the-fly syntax checking package for GNU Emacs 24, replacing the built-in Flymake extension. It features in-buffer error highlights, automatic background checking, a dynamic error list, and a rich extension interface. It has built-in support for many programming and markup languages, including C/C++, Go, Haskell, JavaScript, PHP, Python, Ruby, LaTeX, Shell scripts, and many more, and can easily be extended for new languages.

It is available for installation via package.el from the popular MELPA and MELPA Stable archives.

For more information and comprehensive documentation please consult the online manual, which is also included in the Flycheck packages in the above archives for online reading in Emacs' info browser.

Please follow our Code of Conduct when posting under this tag.

215 questions
27
votes
3 answers

How to prevent flycheck from treating my init.el as a package file?

If flycheck-mode is enabled for my init.el, I got the following kinds of errors: The first line should be of the form: ";;; package --- Summary" (emacs-lisp-checkdoc) ... The footer should be: (provide 'init)\n;;; init.el ends here…
xuhdev
  • 1,839
  • 13
  • 26
25
votes
6 answers

Flycheck with file relative eslint executable

A lot of projects I work on install eslint as a dev dependency, with a custom set of eslint plugins. Right now, flycheck uses the globally installed version of eslint rather than the version of eslint installed with each project. I would like to…
pcardune
  • 353
  • 3
  • 6
18
votes
1 answer

suppress warning: assignment to free variable (and others)

How can I suppress the "assignment to free variable" warning when byte compiling an emacs lisp file? I'm actually mostly interested in suppressing it for a specific buffer when using flycheck, but I understand this is just passing off to the byte…
fommil
  • 1,750
  • 11
  • 24
16
votes
2 answers

Can I turn off or switch the syntax checker for js2-mode?

I have a default setup of js2-mode. This provides nice syntax highlighting and checking but I am now working on a project with a different set of styles (specifically this new project does not use semicolons). This causes every single line of code…
Startec
  • 1,354
  • 1
  • 13
  • 30
15
votes
1 answer

Automatically run org-lint through flycheck

I've got a heap of org-mode files which I publish into HTML for a knowledge base, sometimes the publishing crashes out due to a broken link or something and it's hard to find the problem. I've been recently using org-lint to find the problems. Is…
map7
  • 503
  • 3
  • 15
13
votes
2 answers

Disable Minor Mode in Major Mode

I am trying to disable a minor mode (flycheck) for the latex major mode. This is what I have so far. (defun disable-flycheck-in-tex-src-block () (flycheck-mode -1)) (add-hook 'latex-mode-hook 'disable-flycheck-in-tex-src-block) However, after I…
bkmoney
  • 323
  • 3
  • 10
10
votes
2 answers

How can I prevent flycheck-mode from checking certain files?

I've configured Emacs to open files named *.cfg in shell-script-mode. These are config files, of course, rather than shell scripts, but 90% of the time it does what I want (mainly, good guesses about faces for comments and variable assignment). I…
10
votes
1 answer

How to turn off `emacs-lisp-checkdoc` of flycheck when edit source block in org-mode file?

I have a emacs-lisp block in org-mode and when I try to edit it by press C-c ', flycheck always report errors as below: 0 warning The first line should be of the form: ";;; package --- Summary"... (emacs-lisp-checkdoc) 0 warning …
Enze Chi
  • 1,410
  • 12
  • 28
10
votes
2 answers

disable specific warning in flycheck (specifically "#pragma once in main file")

I'm using flycheck for C++ development, and get the following warning: #pragma once in main file In all headers included in a main file. Searching the webs, I get the impression this has something to do with how gcc and clang (both give the same…
Spacemoose
  • 877
  • 1
  • 7
  • 18
9
votes
1 answer

Getting flycheck "jump to next/previous error" to cycle

I'd like M-g n and M-g p to cycle, at least when I'm using them with flycheck. This feature requires writing a custom function as it's not supported (as mentioned on https://github.com/flycheck/flycheck/issues/64 and confirmed in chat), but I am an…
Blaisorblade
  • 261
  • 1
  • 11
9
votes
1 answer

Using multiple flycheck syntax checkers in web-mode

I'm trying to configure Flycheck to use both csslint and tidy checkers in web-mode without any success. This post suggests using this code for tidy: (eval-after-load 'flycheck '(flycheck-add-mode 'html-tidy 'web-mode)) But adding an extra line…
Sineau
  • 91
  • 1
  • 2
8
votes
2 answers

'Symbol's value as variable is void' in callback from url-retrieve

When executing the following I get an error: (defun caller (func) (url-retrieve "http://m0smith.freeshell.org/" (lambda (status) (funcall func)))) (caller (lambda() (message "called"))) Result: error in process filter: Symbol's value as…
M Smith
  • 279
  • 1
  • 7
8
votes
1 answer

Make flycheck's "reference to free variable" work with macros

The use-package is a useful and popular macro for installing packages, but flycheck always complains about it since it hides variable definitions. For example, if I attempt (use-package org), Flycheck will warn of a reference to free variable 'org.…
Matthew Piziak
  • 5,958
  • 3
  • 29
  • 77
8
votes
1 answer

Best way to disable flycheck checkdoc warnings on specific elisp directory?

I use flycheck with flycheck-elisp-checkdoc checker active and find them fairly useful. Still, I find it irritating to be nagged about missing (provide), section headers (;;; Code, ...), package metadata and similar things while I am editing my…
Mekk
  • 1,017
  • 7
  • 14
8
votes
1 answer

Flycheck could not find file under load-path

I have some elips *.el file in my ~/.emacs.d/gman/ folder, e.g. smart-inputp-methods.el. This folder is added to my load path at the beginning of .emacs file: (add-to-list 'load-path "~/.emacs.d/gman") Leter I importing it: (require…
Geradlus_RU
  • 625
  • 7
  • 17
1
2 3
14 15