-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(v3.4.0) Configuration Files
Currently, the following checkers can read some of their options from configuration files:
- ada/gcc
- asm/gcc
- c/avrgcc
- c/cppcheck
- c/gcc
- c/oclint
- c/sparse
- c/splint
- cobol/cobc
- cpp/cppcheck
- cpp/gcc
- cpp/oclint
- d/dmd
- fortran/gfortran
- objc/gcc
- objc/oclint
- objcpp/gcc
- objcpp/oclint
- verilog/verilator
Depending on the checker, the filename of the corrsponding 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.
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.
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's left
unchanged.