Flycheck (aka “Flymake done right”) is a modern on-the-fly syntax checking extension for GNU Emacs 24 with:
- ready-to-use syntax checkers for a bunch of languages,
- easy customization,
- a comprehensive manual,
- a dead simple, declarative API to create new syntax checkers,
- major-mode based selection of syntax checkers,
- multiple syntax checkers per buffer,
- optional error list popup,
- a “doesn’t get in your way” guarantee,
- and a clean, concise and understandable implementation with decent test coverage.
- Automatic on-the-fly syntax checking while editing
- Fully automatic selection of the best syntax checker
- Optional manual selection of a syntax checker with
C-c ! s
- Built-in syntax checkers for:
- Emacs Lisp
- RST (ReStructuredText)
- Shell scripts (POSIX Shell, Bash and Zsh)
- Nice error indication and highlighting
- Easy customization
- Syntax checker configuration with project-specific configuration files and options
- Error navigation with
- Error list with
C-c ! l
- Declarative API to define new syntax checkers
- Error parsers for structured markup formats (e.g. Checkdoc XML)
The following extensions provide additional cool features for Flycheck:
- flycheck-color-mode-line.el colors the mode line according to the Flycheck status.
Flycheck supports GNU Emacs 24.2 and newer on Linux, OS X and any other decent flavor of Unix. It should work with GNU Emacs 24.1, too, but it is not tested against this version of Emacs.
Flycheck does not support Windows, but tries to be compatible with it. You may try to use Flycheck on Windows. It should mostly work, but expect problems and issues. Pull requests which improve Windows compatibility are welcome.
Flycheck also does not support GNU Emacs 23 and other flavors of Emacs (e.g. XEmacs, Aquamacs, etc.). Don't try, it will not work.
Most checkers have dependencies against external tools that perform the
C-c ! ? to see what a checker needs, e.g.
C-c ! ?
Once installed, enable Flycheck mode with
To enable Flycheck mode in all buffers, in which it can be used, add the
following to your
(add-hook 'after-init-hook #'global-flycheck-mode)
In Flycheck mode the buffer will automatically be checked on the fly, if a
suitable syntax checker exists. Use
C-c ! c to start a syntax check manually.
A suitable syntax checker is automatically selected from the list of registered
C-c ! s to manually select a specific
syntax checker, or configure the syntax checker per file by setting
flycheck-checker as file local variable::
# Local Variables: # flycheck-checker: python-pylint # End:
Some syntax checkers read configuration files. Use
M-x customize-group RET
flycheck-config-files to customize these. Refer to the section Configuration
in the Flycheck info manual.
Errors and warnings from the syntax checker are reported in the mode line,
highlighted in the buffer and indicated with icons in the fringe. Customize
flycheck-highlighting-mode to change the highlighting of errors.
Note: The default highlighting faces provided GNU Emacs are ill-suited to highlight errors. They are too easily overlooked. Make sure to customize these faces to add a striking background color or an underlying, or choose a color theme with reasonable Flycheck faces, for instance the excellent light or dark solarized themes.
C-c ! n and
C-c ! p to navigate between errors. If the point is on an
error, the error message is shown in the echo area or in a popup buffer after a
short delay. You may also hover the mouse over a highlighted error to get a
tooltip with the error message.
Read the complete manual with
C-c ! i or
The following people contributed to flycheck:
Bozhidar Batsov provided valuable feedback and refinements, brought
Flycheck to a larger user base by adding it to his awesome Prelude
project, and added a Ruby syntax checker using
- Damon Haley helped to shape and test the PHP CodeSniffer checker.
Krzysztof Witkowski implemented
evalsupport in Flycheck commands.
- Magnar Sveen developed the awesome dash.el and s.el libraries, that drive considerable parts of Flycheck's internals.
- Marian Schubert added the Perl syntax checker.
- Mark Hellewell added the Puppet syntax and style checkers.
- Martin Grenfell created the awesome Vim library syntastic which inspired this project and many of its checkers.
- Matthias Dahl improved the performance of Flycheck's temp file handling.
Peter Vasil contributed syntax checkers for XML, Lua and Go (using
go test), added unit tests and did valuable testing.
Robert Dallas Gray made error display customizable with
Robert Zaremba added a Go syntax checker using
- steckerhalter provided the PHP CodeSniffer checker.
- Steve Purcell implemented many checkers, contributed important ideas to the design of the checker API and engaged in worthwhile discussion to shape this project.
- Sylvain Benner added syntax checkers for Elixir and Erlang, and wrote the cool flycheck-color-mode-line.el extension.
Sylvain Rousseau added a syntax checker for POSIX shell script
bash, and improved error parsing in the Bash script syntax checker.
- Yannick Roehlly added support for PEP8 naming errors to the Flake8 syntax checker.
- Victor Deryagin added the Rust syntax checker.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
See COPYING for details.