Usage

Flycheck Mode

Syntax checking is done in the Flycheck minor mode:

M-x flycheck-mode

Toggle Flycheck Mode for the current buffer.

User Option flycheck-mode

Whether Flycheck Mode is enabled in the current buffer.

M-x global-flycheck-mode

Toggle Flycheck Mode for all live buffers, and for new buffers.

With Global Flycheck Mode, Flycheck Mode is automatically enabled in all buffers, for which a suitable syntax checker exists and is enabled.

Note

Flycheck Mode will not be enabled in buffers for remote or encrypted files. The former is flaky and might be very slow, and the latter might leak confidential data to temporary directories.

You can still explicitly enable Flycheck Mode in such buffers with flycheck-mode. This is not recommended though.

User Option global-flycheck-mode

Whether Flycheck Mode is enabled globally.

If you like Flycheck Mode, you may want to enable it permanently, either by customizing global-flycheck-mode, or by adding the following code to your init.el:

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

Syntax checking

By default, Flycheck Mode checks syntax automatically when

  • the mode is enabled,
  • the file is saved,
  • new lines are inserted,
  • or some short time after the last change to the buffer.

However, you can customize automatic syntax checking with flycheck-check-syntax-automatically:

User Option flycheck-check-syntax-automatically

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate symbolp.

When Flycheck should check syntax automatically.

This variable is a list of events that may trigger syntax checks.
The following events are known:

`save'
     Check syntax immediately after the buffer was saved.

`idle-change'
     Check syntax a short time (see `flycheck-idle-change-delay')
     after the last change to the buffer.

`new-line'
     Check syntax immediately after a new line was inserted into
     the buffer.

`mode-enabled'
     Check syntax immediately when `flycheck-mode' is enabled.

Flycheck performs a syntax checks only on events, which are
contained in this list.  For instance, if the value of this
variable is (mode-enabled save), Flycheck will only check if
the mode is enabled or the buffer was saved, but never after
changes to the buffer contents.

If nil, never check syntax automatically.  In this case, use
`flycheck-buffer' to start a syntax check manually.

This user option was introduced, or its default value was changed, in version 0.12 of the flycheck package.

User Option flycheck-idle-change-delay

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate numberp.

How many seconds to wait before checking syntax automatically.

After the buffer was changed, Flycheck will wait as many seconds
as the value of this variable before starting a syntax check.  If
the buffer is modified during this time, Flycheck will wait
again.

This variable has no effect, if `idle-change' is not contained in
`flycheck-check-syntax-automatically'.

This user option was introduced, or its default value was changed, in version 0.13 of the flycheck package.

Regardless of automatic syntax checking you can also check the buffer manually:

C-c ! c
M-x flycheck-buffer
Check syntax in the current buffer.

Each syntax check conducts the following steps:

  1. Run hooks in flycheck-before-syntax-check-hook
  2. Clear error information from previous syntax checks.
  3. Select a suitable syntax checker. See Syntax checker selection, for more information on how syntax checkers are selected.
  4. Copy the contents of the buffer to be checked to a temporary file.
  5. Run the syntax checker.
  6. Parse the output of the tool, and report all errors and warnings. See Error reporting, for more information.
  7. If the buffer can be checked with another syntax checker, continue from step 4, but with the next syntax checker. This is called chaining of syntax checkers.
  8. Run hooks in flycheck-after-syntax-check-hook.

Whenever the status of Flycheck changes, Flycheck runs flycheck-status-changed-functions:

Hook flycheck-status-changed-functions

Variable properties

This variable may be risky if used as a file-local variable.

Functions to run if the Flycheck status changed.

This hook is run whenever the status of Flycheck changes.  Each
hook function takes the status symbol as sinlge argument, as
given to `flycheck-report-status', which see.

This variable is a abnormal hook.  See Info
node `(elisp)Hooks'.

This hook was introduced, or its default value was changed, in version 0.20 of the flycheck package.

There are also special hooks, which run only for certain status changes:

Hook flycheck-after-syntax-check-hook

Variable properties

This variable may be risky if used as a file-local variable.

Functions to run after each syntax check.

This hook is run after a syntax check was finished.

At this point, *all* chained checkers were run, and all errors
were parsed, highlighted and reported.  The variable
`flycheck-current-errors' contains all errors from all syntax
checkers run during the syntax check, so you can apply any error
analysis functions.

Note that this hook does *not* run after each individual syntax
checker in the syntax checker chain, but only after the *last
checker*.

This variable is a normal hook.  See Info node `(elisp)Hooks'.
Hook flycheck-before-syntax-check-hook

Variable properties

This variable may be risky if used as a file-local variable.

Functions to run before each syntax check.

This hook is run right before a syntax check starts.

Error information from the previous syntax check is *not*
cleared before this hook runs.

Note that this hook does *not* run before each individual syntax
checker in the syntax checker chain, but only before the *first
checker*.

This variable is a normal hook.  See Info node `(elisp)Hooks'.

There is also a hook run whenever a syntax check fails:

Hook flycheck-syntax-check-failed-hook

Variable properties

This variable may be risky if used as a file-local variable.

Functions to run if a syntax check failed.

This hook is run whenever an error occurs during Flycheck's
internal processing.  No information about the error is given to
this hook.

You should use this hook to conduct additional cleanup actions
when Flycheck failed.

This variable is a normal hook.  See Info node `(elisp)Hooks'.

During syntax checks, Flycheck generates some temporary files for syntax checker input and output. Use flycheck-temp-prefix to change the prefix of these temporary files:

User Option flycheck-temp-prefix

Variable properties

This variable may be risky if used as a file-local variable.

Prefix for temporary files created by Flycheck.

This user option was introduced, or its default value was changed, in version 0.19 of the flycheck package.

Syntax checker selection

By default Flycheck selects a suitable syntax checker automatically from flycheck-checkers, with respect to flycheck-disabled-checkers:

User Option flycheck-checkers

Variable properties

This variable may be risky if used as a file-local variable.

Syntax checkers available for automatic selection.

A list of Flycheck syntax checkers to choose from when syntax
checking a buffer.  Flycheck will automatically select a suitable
syntax checker from this list, unless `flycheck-checker' is set,
either directly or with `flycheck-select-checker'.

You should not need to change this variable normally.  In order
to disable syntax checkers, please use
`flycheck-disabled-checkers'.  This variable is intended for 3rd
party extensions to tell Flycheck about new syntax checkers.

Syntax checkers in this list must be defined with
`flycheck-define-checker'.

An item in this list is a registered syntax checker.

User Option flycheck-disabled-checkers

Variable properties

Automatically becomes buffer-local when set. This variable is safe as a file local variable if its value satisfies the predicate flycheck-symbol-list-p.

Syntax checkers excluded from automatic selection.

A list of Flycheck syntax checkers to exclude from automatic
selection.  Flycheck will never automatically select a syntax
checker in this list, regardless of the value of
`flycheck-checkers'.

However, syntax checkers in this list are still available for
manual selection with `flycheck-select-checker'.

Use this variable to disable syntax checkers, instead of removing
the syntax checkers from `flycheck-checkers'.  You may also use
this option as a file or directory local variable to disable
specific checkers in individual files and directories
respectively.

This user option was introduced, or its default value was changed, in version 0.16 of the flycheck package.

A syntax checker in flycheck-checkers and not in flycheck-disabled-checkers is an enabled syntax checker.

Flycheck uses the first enabled and suitable syntax checker for the current buffer. See Languages and syntax checkers for a list of all available syntax checkers.

If no suitable syntax checker is found, the syntax check is silently omitted. No error is signalled. Only a special indicator in the mode line informs about the omitted syntax check. See Mode line for details.

You can manually select a specific syntax checker for the current buffer, too:

C-c ! s
M-x flycheck-select-checker

Select the syntax checker for the current buffer by setting flycheck-checker, and run a syntax check with the new syntax checker.

Prompt for a syntax checker and set flycheck-checker.

Any syntax checker can be selected with this command, regardless of whether it is enabled.

C-u C-c ! s
C-u M-x flycheck-select-checker

Deselect the current syntax checker, and run a syntax check with an automatically selected syntax checker.

Set flycheck-checker to nil.

Function flycheck-select-checker checker
Select CHECKER for the current buffer.

CHECKER is a syntax checker symbol (see `flycheck-checkers') or
nil.  In the former case, use CHECKER for the current buffer,
otherwise deselect the current syntax checker (if any) and use
automatic checker selection via `flycheck-checkers'.

If called interactively prompt for CHECKER.  With prefix arg
deselect the current syntax checker and enable automatic
selection again.

Set `flycheck-checker' to CHECKER and automatically start a new
syntax check if the syntax checker changed.

CHECKER will be used, even if it is not contained in
`flycheck-checkers', or if it is disabled via
`flycheck-disabled-checkers'.
Variable flycheck-checker

Variable properties

Automatically becomes buffer-local when set. This variable is safe as a file local variable if its value satisfies the predicate flycheck-registered-checker-p.

Syntax checker to use for the current buffer.

If unset or nil, automatically select a suitable syntax checker
from `flycheck-checkers' on every syntax check.

If set to a syntax checker only use this syntax checker and never
select one from `flycheck-checkers' automatically.  The syntax
checker is used regardless of whether it is contained in
`flycheck-checkers' or `flycheck-disabled-checkers'.  If the
syntax checker is unusable in the current buffer an error is
signaled.

A syntax checker assigned to this variable must be defined with
`flycheck-define-checker'.

Use the command `flycheck-select-checker' to select a syntax
checker for the current buffer, or set this variable as file
local variable to always use a specific syntax checker for a
file.  See Info Node `(emacs)Specifying File Variables' for more
information about file variables.

You can change the completion system used by flycheck-select-checker:

User Option flycheck-completion-system
The completion system to use.

`ido'
     Use IDO.

     IDO is a built-in alternative completion system, without
     good flex matching and a powerful UI.  You may want to
     install flx-ido (see URL `https://github.com/lewang/flx') to
     improve the flex matching in IDO.

`grizzl'
     Use Grizzl.

     Grizzl is an alternative completion system with powerful
     flex matching, but a very limited UI.  See URL
     `https://github.com/d11wtq/grizzl'.

nil
     Use the standard unfancy `completing-read'.

     `completing-read' has a very simple and primitive UI, and
     does not offer flex matching.  This is the default setting,
     though, to match Emacs' defaults.  With this system, you may
     want enable option `icomplete-mode' to improve the display
     of completion candidates at least.

This user option was introduced, or its default value was changed, in version 0.17 of the flycheck package.

Each syntax checker provides documentation with information about the executable the syntax checker uses, in which buffers it will be used for syntax checks, and whether it can be configured. See Configuration, for more information about syntax checker configuration.

C-c ! ?
M-x flycheck-describe-checker

Show the documentation of a syntax checker.

Syntax checker configuration

Syntax checker executables

For each syntax checker, there is a buffer-local, customizable variable flycheck-checker-executable, where checker is the name of the syntax checker.

The value of this variable is either nil, or a string. In the former case, Flycheck uses the default executable from the syntax checker definition when executing the syntax checker. In the latter case, it uses the value of the variable as executable.

Use these variables to override the executable from the definition per buffer. For instance, you could use a different Emacs version with the emacs-lisp or emacs-lisp-checkdoc.

You can either set these variables directly in your init.el, or change them interactively:

C-c ! e
M-x flycheck-set-checker-executable

Set the executable of a syntax checker in the current buffer.

Prompt for a syntax checker and an executable file, and set the executable variable of the syntax checker.

C-u C-c ! e
C-u M-x flycheck-set-checker-executable

Reset the executable of a syntax checker in the current buffer.

Prompt for a syntax checker and reset its executable to the default.

Syntax checker options

Some syntax checkers can be configured via options. See Supported languages for a complete list of options for each syntax checkers.

All options are customizable via M-x customize-group RET flycheck-options, and automatically buffer-local to easily set them in hooks.

Options are mainly intended to be used by extensions, and via File or Directory Local variables. See File Variables(emacs) and Directory Variables(emacs) respectively.

Syntax checker configuration files

Some syntax checkers also read configuration files, denoted by associated configuration file variables. See Supported languages of these variables.

All options are customizable via M-x customize-group RET flycheck-config-files, and automatically buffer-local to easily set them in hooks. You may also set them via File or Directory Local variables. See File Variables(emacs) and Directory Variables(emacs) respectively.

When set to a string, Flycheck tries to locate the configuration file using the functions in flycheck-locate-config-file-functions and passes the name of the file to the syntax checker:

User Option flycheck-locate-config-file-functions

Variable properties

This variable may be risky if used as a file-local variable.

Functions to locate syntax checker configuration files.

Each function in this hook must accept two arguments: The value
of the configuration file variable, and the syntax checker
symbol.  It must return either a string with an absolute path to
the configuration file, or nil, if it cannot locate the
configuration file.

The functions in this hook are called in order of appearance, until a
function returns non-nil.  The configuration file returned by that
function is then given to the syntax checker if it exists.

This variable is an abnormal hook.  See Info
node `(elisp)Hooks'.

With the default value of this variable, configuration files are located by the following algorithm:

  1. If the configuration file variable contains a path a directory separator, expand the path against the buffer’s default directory and use the resulting path as configuration file.
  2. If the buffer has a file name, search the buffer’s directory and any ancestors thereof for the configuration file.
  3. Eventually attempt to locate the configuration file in the user’s home directory.

If any of these steps succeeds, the subsequent steps are not executed.

Error reporting

Errors and warnings from a syntax checker are

Face flycheck-error
Face flycheck-warning
Face flycheck-info

The faces to use to highlight errors, warnings and info messages respectively.

Note

The default faces provided by GNU Emacs are ill-suited to highlight errors because these are relatively pale and do not specify a background color or underline. Hence highlights are easy to overlook and even invisible for white space.

For best error highlighting customize these faces, or choose a color theme that has reasonable Flycheck faces. The popular Solarized and Zenburn themes are known to have good Flycheck faces.

User Option flycheck-highlighting-mode

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate symbolp.

The highlighting mode for Flycheck errors and warnings.

The highlighting mode controls how Flycheck highlights errors in
buffers.  The following modes are known:

`columns'
     Highlight the error column.  If the error does not have a column,
     highlight the whole line.

`symbols'
     Highlight the symbol at the error column, if there is any,
     otherwise behave like `columns'.  This is the default.

`sexps'
     Highlight the expression at the error column, if there is
     any, otherwise behave like `columns'.  Note that this mode
     can be *very* slow in some major modes.

`lines'
     Highlight the whole line.

nil
     Do not highlight errors at all.  However, errors will still
     be reported in the mode line and in error message popups,
     and indicated according to `flycheck-indication-mode'.

This user option was introduced, or its default value was changed, in version 0.14 of the flycheck package.

Face flycheck-fringe-error
Face flycheck-fringe-warning
Face flycheck-fringe-info

The faces of fringe indicators for errors, warnings and info messages respectively.

User Option flycheck-indication-mode

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate symbolp.

The indication mode for Flycheck errors and warnings.

This variable controls how Flycheck indicates errors in buffers.
May either be `left-fringe', `right-fringe', or nil.

If set to `left-fringe' or `right-fringe', indicate errors and
warnings via icons in the left and right fringe respectively.

If set to nil, do not indicate errors and warnings, but just
highlight them according to `flycheck-highlighting-mode'.

You can also completely customize error processing by hooking into Flycheck:

Hook flycheck-process-error-functions

Variable properties

This variable may be risky if used as a file-local variable.

Functions to process errors.

Each function in this hook must accept a single argument: A
Flycheck error to process.

All functions in this hook are called in order of appearance,
until a function returns non-nil.  Thus, a function in this hook
may return nil, to allow for further processing of the error, or
any non-nil value, to indicate that the error was fully processed
and inhibit any further processing.

The functions are called for each newly parsed error immediately
after the corresponding syntax checker finished.  At this stage,
the overlays from the previous syntax checks are still present,
and there may be further syntax checkers in the chain.

This variable is an abnormal hook.  See Info
node `(elisp)Hooks'.

See also

Error API

This hook was introduced, or its default value was changed, in version 0.13 of the flycheck package.

If you hover a highlighted error with the mouse, a tooltip with the top-most error message will be shown.

Ultimately, you can clear all reported errors at once:

C-c ! C
M-x flycheck-clear

Clear all Flycheck errors and warnings in the current buffer.

You should not normally need this command, because Flycheck checks the buffer periodically anyway.

Note that if a syntax checker reports too many errors, Flycheck will discard these errors and disable the syntax checker for subsequent syntax checks. The threshold is customizable with flycheck-checker-error-threshold:

User Option flycheck-checker-error-threshold

Variable properties

This variable may be risky if used as a file-local variable.

Maximum errors allowed per syntax checker.

The value of this variable is either an integer denoting the
maximum number of errors per syntax checker and buffer, or nil to
not limit the errors reported from a syntax checker.

If this variable is a number and a syntax checker reports more
errors than the value of this variable, its errors are not
discarded, and not highlighted in the buffer or available in the
error list.  The affected syntax checker is also disabled for
future syntax checks of the buffer.

This user option was introduced, or its default value was changed, in version 0.22 of the flycheck package.

Error messages

Flycheck also displays error messages under point after a short delay:

User Option flycheck-display-errors-delay

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate numberp.

Delay in seconds before displaying errors at point.

Use floating point numbers to express fractions of seconds.

This user option was introduced, or its default value was changed, in version 0.15 of the flycheck package.

The error is displayed via flycheck-display-errors-function:

User Option flycheck-display-errors-function

Variable properties

This variable may be risky if used as a file-local variable.

Function to display error messages.

If set to a function, call the function with the list of errors
to display as single argument.  Each error is an instance of the
`flycheck-error' struct.

If set to nil, do not display errors at all.

See also

The flycheck-pos-tip extension provides a display function to show errors at point in a graphical popup.

This user option was introduced, or its default value was changed, in version 0.13 of the flycheck package.

The default function displays the error messages in the echo area:

Function flycheck-display-error-messages errors
Display the messages of ERRORS.

Concatenate all non-nil messages of ERRORS separated by empty
lines, and display them with `display-message-or-buffer', which
shows the messages either in the echo area or in a separate
buffer, depending on the number of lines.  See Info
node `(elisp)Displaying Messages' for more information.

In the latter case, show messages in
`flycheck-error-message-buffer'.

Alternatively, the following error display functions are available:

Function flycheck-display-error-messages-unless-error-list errors
Show messages of ERRORS unless the error list is visible.

Like `flycheck-display-error-messages', but only if the error
list (see `flycheck-list-errors') is not visible in any window in
the current frame.

You can also work with the error messages at point, and copy them into the kill ring or search them on Google:

C-c ! C-w
M-x flycheck-copy-messages-as-kill

Copy all Flycheck error messages at the current point into kill ring.

C-c ! /
M-x flycheck-google-messages

Google for all Flycheck error messages at the current point.

If there are more than flycheck-google-max-messages errors at point, signal an error, to avoid spamming your browser with Google tabs.

Requires the Google This library, which is available on MELPA.

User Option flycheck-google-max-messages

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate numberp.

How many messages to google at once.

If set to an integer, `flycheck-google-messages' will signal an
error if there are more Flycheck messages at point than the value
of this variable.

If set to nil, `flycheck-google-messages' will always google *all*
messages at point.  This setting is *not* recommended.

This user option was introduced, or its default value was changed, in version 0.10 of the flycheck package.

Error list

You can also show a list with all errors in the current buffer:

C-c ! l
M-x flycheck-list-errors
M-x list-flycheck-errors

List all errors in the current buffer in a separate buffer.

The error list automatically refreshes after a syntax check, and follows the current buffer and window, that is, if you switch to another buffer or window, the error list is updated to show the errors of the new buffer or window.

Every time the error list refreshes, flycheck-error-list-after-refresh-hook is run:

Hook flycheck-error-list-after-refresh-hook

Variable properties

This variable may be risky if used as a file-local variable.

Functions to run after the error list was refreshed.

This hook is run whenever the error list is refreshed.

This variable is a normal hook.  See Info node `(elisp)Hooks'.

This hook was introduced, or its default value was changed, in version 0.21 of the flycheck package.

When you move the point in the current buffer while the error list is visible, all errors on the current line are highlighted in the error list with flycheck-error-list-highlight:

Face flycheck-error-list-highlight
Flycheck face to highlight errors in the error list.

This face was introduced, or its default value was changed, in version 0.15 of the flycheck package.

You can customize the appearance of the line and column numbers and of the syntax checker name:

Face flycheck-error-list-line-number
Face for line numbers in the error list.

This face was introduced, or its default value was changed, in version 0.16 of the flycheck package.

Face flycheck-error-list-column-number
Face for line numbers in the error list.

This face was introduced, or its default value was changed, in version 0.16 of the flycheck package.

Face flycheck-error-list-checker-name
Face for the syntax checker name in the error list.

This face was introduced, or its default value was changed, in version 0.21 of the flycheck package.

Error navigation

Flycheck integrates into standard error navigation commands of Emacs. If no compilation buffer (including those from M-x compile, M-x grep, M-x occur, etc.) is visible, M-g n (next-error) and M-g p (previous-error) will navigate between Flycheck warnings and errors in the current buffer. See Compilation Mode(emacs) for more information about these commands.

You can disable this integration by setting flycheck-standard-error-navigation to nil:

User Option flycheck-standard-error-navigation

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate booleanp.

Whether to support error navigation with `next-error'.

If non-nil, enable navigation of Flycheck errors with
`next-error', `previous-error' and `first-error'.  Otherwise,
these functions just navigate errors from compilation modes.

Flycheck error navigation with `flycheck-next-error',
`flycheck-previous-error' and `flycheck-first-error' is always
enabled, regardless of the value of this variable.

Note that this setting only takes effect when `flycheck-mode' is
enabled.  Changing it will not affect buffers which already have
`flycheck-mode' enabled.

This user option was introduced, or its default value was changed, in version 0.15 of the flycheck package.

Visible compilation buffers take precedence over Flycheck navigation. If such a buffer is visible, M-g n and M-g p will ignore Flycheck errors and warnings, and navigate errors (or generally results) reported by the compilation buffer instead.

To address this issue, Flycheck provides independent error navigation commands, which are not affected by flycheck-standard-error-navigation:

C-c ! n
M-x flycheck-next-error

Jump to the next Flycheck error.

With prefix argument, jump forwards by as many errors as specified by the prefix argument, e.g. M-3 C-c ! n will move to the 3rd error from the current point.

C-c ! p
M-x flycheck-previous-error

Jump to the previous Flycheck error.

With prefix argument, jump backwards by as many errors as specified by the prefix argument, e.g. M-3 C-c ! p will move to the 3rd previous error from the current point.

M-x flycheck-first-error

Jump to the first Flycheck error.

With prefix argument, jump forwards to by as many errors as specified by the prefix argument, e.g. M-3 M-x flycheck-first-error moves to the 3rd error from the beginning of the buffer.

These commands consider all errors by default, but you can ignore errors below a given level with flycheck-navigation-minimum-level:

User Option flycheck-navigation-minimum-level

Variable properties

This variable is safe as a file local variable if its value satisfies the predicate flycheck-error-level-p.

The minimum level of errors to navigate.

If set to an error level, only navigate errors whose error level
is at least as severe as this one.  If nil, navigate all errors.

This user option was introduced, or its default value was changed, in version 0.21 of the flycheck package.

Mode line

Flycheck indicates its state in the mode line:

FlyC
There are no errors in the current buffer.
FlyC*
A syntax check is being performed currently.
FlyC:3/4
There are three errors and four warnings in the current buffer.
FlyC-
Automatic syntax checker selection did not find a suitable syntax checker. See Syntax checker selection for more information.
FlyC!
The syntax check failed. Inspect the *Messages* buffer for details.
FlyC?

The syntax check had a dubious result. The definition of the syntax checker may be flawed. Inspect the *Messages* buffer for details.

This indicator should never be displayed for built-in syntax checkers. If it is, please report an issue to the Flycheck developers, as by Reporting issues.

Change flycheck-mode-line to customize the mode line reporting:

User Option flycheck-mode-line

Variable properties

This variable may be risky if used as a file-local variable.

Mode line lighter for Flycheck.

The value of this variable is a mode line template as in
`mode-line-format'.  See Info Node `(elisp)Mode Line Format' for
more information.  Note that it should contain a _single_ mode
line construct only.

Customize this variable to change how Flycheck reports its status
in the mode line.  You may use `flycheck-mode-line-status-text'
to obtain a human-readable status text, including an
error/warning count.

You may also assemble your own status text.  The current status
of Flycheck is available in `flycheck-last-status-change'.  The
errors in the current buffer are stored in
`flycheck-current-errors', and the function
`flycheck-count-errors' may be used to obtain the number of
errors grouped by error level.

Set this variable to nil to disable the mode line completely.

This user option was introduced, or its default value was changed, in version 0.20 of the flycheck package.

See also

The flycheck-color-mode-line extension changes the background colour of the mode line according to the result of the last syntax check.