Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

(v3.6.0) Configuration Files

LCD 47 edited this page Jan 19, 2015 · 1 revision

Currently, the following checkers can read some of their options from configuration files:

Naming

Depending on the checker, the filename of the corresponding configuration file can be specified by setting either g:syntastic_<filetype>_config_file or g:syntastic_<checker>_config_file. See the checker's documentation in the wiki for the the exact name.

Location

A configuration file is looked up in the directory of the file being checked, then upwards in parent directories. The search stops either when a file with the right name is found, or when the root of the filesystem is reached.

Consequently you would normally put a configuration file in the top directory of your project, and you would override it when needed with other configuration files placed in subdirectories.

Format

The file is expected to contain one option per line. Empty lines and lines starting with # are removed. On each line, leading and trailing spaces are also removed. Each option is then escaped, so you don't have to worry about special characters.

Lines starting with -I are assumed to be include paths, and are handled specially. If the path following a -I is relative, it's treated as being relative to the current configuration file, and is replaced by the corresponding absolute path. If the path is absolute to begin with, it is left unchanged.

Please note that, aside from -I, syntastic doesn't try to keep track of options with arguments. If you need to pass f.i. -aux-info filename to your compiler you have to write -aux-info and filename on separate lines in the configuration file, otherwise syntastic will quote the space and merge them in a single string, which is probably not what you mean:

-aux-info
filename

In the same vein, = in options not special in any way. As stated above, everything on a line (with the exception of lines starting with -I, as noted) is considered an "option" and escaped.

Clone this wiki locally