Syntax check tools are configured using the
flymake-allowed-file-name-masks list. Each item of this list
has the following format:
(filename-regexp, init-function, cleanup-function, getfname-function)
flymake-allowed-file-name-masksare searched sequentially. The first item with
filename-regexpmatching buffer filename is selected. If no match is found,
flymake-modeis switched off.
init-functionis required to initialize the syntax check, usually by creating a temporary copy of the buffer contents. The function must return
(list cmd-name arg-list). If
init-functionreturns null, syntax check is aborted, by
flymake-modeis not switched off.
cleanup-functionis called after the syntax check process is complete and should take care of proper deinitialization, which is usually deleting a temporary copy created by the
flymake-get-real-file-name, can be used as
To add support for a new syntax check tool, write corresponding
init-function, and, optionally
getfname-function. If the format of error messages reported by
the new tool is not yet supported by Flymake, add a new entry to
The following sections contain some examples of configuring Flymake support for various syntax check tools.