Function: flycheck-define-command-checker

Define SYMBOL as syntax checker to run a command.

Define SYMBOL as generic syntax checker via
`flycheck-define-generic-checker', which uses an external command
to check the buffer. SYMBOL and DOCSTRING are the same as for

In addition to the properties understood by
`flycheck-define-generic-checker', the following PROPERTIES
constitute a command syntax checker. Unless otherwise noted, all
properties are mandatory. Note that the default `:error-filter'
of command checkers is `flycheck-sanitize-errors'.

`:command COMMAND'
The command to run for syntax checking.

COMMAND is a list of the form `(EXECUTABLE [ARG ...])'.

EXECUTABLE is a string with the executable of this syntax
checker. It can be overridden with the variable
`flycheck-SYMBOL-executable'. Note that this variable is
NOT implicitly defined by this function. Use
`flycheck-def-executable-var' to define this variable.

Each ARG is an argument to the executable, either as string,
or as special symbol or form for
`flycheck-substitute-argument', which see.

`:error-patterns PATTERNS'
A list of patterns to parse the output of the `:command'.

Each ITEM in PATTERNS is a list `(LEVEL SEXP ...)', where
LEVEL is a Flycheck error level (see
`flycheck-define-error-level'), followed by one or more RX
`SEXP's which parse an error of that level and extract line,
column, file name and the message.

See `rx' for general information about RX, and
`flycheck-rx-to-string' for some special RX forms provided
by Flycheck.

All patterns are applied in the order of declaration to the
whole output of the syntax checker. Output already matched
by a pattern will not be matched by subsequent patterns. In
other words, the first pattern wins.

This property is optional. If omitted, however, an
`:error-parser' is mandatory.

`:error-parser FUNCTION'
A function to parse errors with.

The function shall accept three arguments OUTPUT CHECKER
BUFFER. OUTPUT is the syntax checker output as string,
CHECKER the syntax checker that was used, and BUFFER a
buffer object representing the checked buffer. The function
must return a list of `flycheck-error' objects parsed from

This property is optional. If omitted, it defaults to
`flycheck-parse-with-patterns'. In this case,
`:error-patterns' is mandatory.

`:standard-input t'
Whether to send the buffer contents on standard input.

If this property is given and has a non-nil value, send the
contents of the buffer on standard input.

Defaults to nil. Note that you may not give `:start', `:interrupt', and `:print-doc' for a command checker. You can give a custom `:verify' function, though, whose results will be appended to the default `:verify' function of command checkers. (fn SYMBOL DOCSTRING &rest PROPERTIES)