Skip to content
This repository

Modern on the fly syntax checking for GNU Emacs

branch: master
README.rst

Flycheck

license travis

Flycheck is a modern on-the-fly syntax checking extension for GNU Emacs 24.

It uses various syntax checking and linting tools to check the contents of buffers, and reports warnings and errors directly in the buffer, or in an optional error list. The following screenshot shows Flycheck at work in an Emacs Lisp buffer, with with the Solarized Light color theme and the Source Code Pro font:

https://github.com/flycheck/flycheck/raw/master/doc/images/screenshot.png

It is a replacement for the older Flymake extension, which is part of Emacs, with more supported languages, more features, and better extensibility:

Installation

Flycheck needs GNU Emacs 24, and works best on Unix systems (i.e. Linux or OS X). Windows or other flavors of Emacs are not supported.

For almost all supported languages, Flycheck also needs additional external programs. See Supported Languages for a list of supported languages and the corresponding checker programs, and use C-c ! ? to get help about specific checkers inside Emacs.

Install the ELPA package from MELPA or Marmalade with M-x package-install RET flycheck.

In your Cask file:

(source gnu)
(source melpa)

(depends-on "flycheck")

See Installation for detailed installation instructions.

Quick start

Once installed, enable Flycheck globally with the following line in your init.el:

(add-hook 'after-init-hook #'global-flycheck-mode)

Install some syntax checking tools for the programming or markup language you are using. For Python:

$ pip install --user pylint

Or for Ruby:

$ gem install rubocop ruby-lint

Or for Haskell:

$ brew install haskell-platform
$ cabal install hlint

Now browse the syntax checker options to configure your syntax checkers. Typically you don't need to change any options, though. Flycheck will mostly work automatically.

Flycheck will now check syntax using these tools, when you visit a buffer in any of these languages. Syntax checking happens automatically when you save the buffer or make any changes. Flycheck highlights errors and warnings in the buffer, indicates them in the fringe, and reports their numbers in the mode line.

Use C-c ! n and C-c ! p to navigate between error locations. If you keep the point at an error location, Flycheck will show the error message in the echo area after a short delay. You can also hover error locations with the mouse and see the error message in a tooltip.

To get an overview of all errors and warnings in the current buffer, type C-c ! l to pop up a list of all errors in your current buffer. The error list updates automatically when you fix errors or introduce new ones, or when you switch to another buffer.

For more details, read the Usage instructions in the manual.

Support

Contribute

Credits

License

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.

The Flycheck documenation is free documentation: you can copy, distribute and/or modify it under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at https://github.com/flycheck/flycheck/blob/master/doc/fdl.txt.

Alternatively, you may copy, distribute and/or modify the Flycheck documentation under the terms of the Creative Commons Attribution-ShareAlike 4.0 International Public License. A copy of the license can be obtained at https://creativecommons.org/licenses/by-sa/4.0/legalcode.

Something went wrong with that request. Please try again.