Update docs to describe the new checker infrastructure.

This commit is contained in:
LCD 47 2013-11-11 10:54:35 +02:00
parent a5b5fb784e
commit c245568e57

View File

@ -54,9 +54,9 @@ syntax checker plugins are defined on a per-filetype basis where each one wraps
up an external syntax checking program. The core script delegates off to these up an external syntax checking program. The core script delegates off to these
plugins and uses their output to provide the syntastic functionality. plugins and uses their output to provide the syntastic functionality.
Take a look in the syntax_checkers directory for a list of supported filetypes Take a look at the wiki for a list of supported filetypes and checkers:
and checkers.
https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers
============================================================================== ==============================================================================
2. Functionality provided *syntastic-functionality* 2. Functionality provided *syntastic-functionality*
@ -433,7 +433,7 @@ native python checker.
Some filetypes, like PHP, have style checkers as well as syntax checkers. These Some filetypes, like PHP, have style checkers as well as syntax checkers. These
can be chained together like this: > can be chained together like this: >
let g:syntastic_php_checkers=['php', 'phpcs', 'phpmd']` let g:syntastic_php_checkers = ['php', 'phpcs', 'phpmd']
< <
This is telling syntastic to run the 'php' checker first, and if no errors are This is telling syntastic to run the 'php' checker first, and if no errors are
found, run 'phpcs', and then 'phpmd'. found, run 'phpcs', and then 'phpmd'.
@ -441,23 +441,24 @@ found, run 'phpcs', and then 'phpmd'.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
5.2 Configuring specific checkers *syntastic-config-makeprg* 5.2 Configuring specific checkers *syntastic-config-makeprg*
Most checkers use the 'syntastic#makeprg#build()' function and provide many Most checkers use the 'makeprgBuild()' function and provide many options by
options by default - in fact you can customise every part of the command default - in fact you can customise every part of the command that gets called.
that gets called.
Checkers that use 'syntastic#makeprg#build()' look like this: > Checkers that use 'makeprgBuild()' construct a 'makeprg' like this: >
let makeprg = syntastic#makeprg#build({ let makeprg = self.makeprgBuild({
\ 'exe': 'ruby', \ 'exe': self.getExec(),
\ 'args': '-a -b -c', \ 'args': '-a -b -c',
\ 'post_args': '--more --args', \ 'post_args': '--more --args',
\ 'tail': '> /tmp/output', \ 'tail': '> /tmp/output' })
\ 'checker': self })
< <
The 'checker' argument is mandatory. All other arguments above are optional, The result is a 'makeprg' of the form: >
and can be overriden by setting global variables - even parameters not <exe> <args> <filename> <post_args> <tail>
specified in the call to syntastic#makeprg#build(). If 'exe' is the same as <
the name of the checker, it may be omitted.
All arguments above are optional, and can be overriden by setting global
variables - even parameters not specified in the call to makeprgBuild(). If
'exe' is the same as the checker 'exec' attribute, it may be omitted.
E.g. To override the checker exe above, you could do this: > E.g. To override the checker exe above, you could do this: >
let g:syntastic_ruby_mri_exe = "another_ruby_checker_exe.rb" let g:syntastic_ruby_mri_exe = "another_ruby_checker_exe.rb"
@ -468,14 +469,14 @@ To override the args and the tail: >
< <
The general form of the override options is: > The general form of the override options is: >
syntastic_[filetype]_[subchecker]_[option-name] syntastic_<filetype>_<subchecker>_<option-name>
< <
For checkers that do not use the 'syntastic#makeprg#build()' function you For checkers that do not use the 'makeprgBuild()' function you will have to
will have to look at the source code of the checker in question. If there are look at the source code of the checker in question. If there are specific
specific options that can be set, these are usually documented in the wiki: options that can be set, these are usually documented in the wiki:
https://github.com/scrooloose/syntastic/wiki/Syntaxcheckers https://github.com/scrooloose/syntastic/wiki/Syntax-Checkers
============================================================================== ==============================================================================
6. Notes *syntastic-notes* 6. Notes *syntastic-notes*
@ -523,7 +524,7 @@ The core maintainers of syntastic are:
Gregor Uhlenheuer (github: kongo2002) Gregor Uhlenheuer (github: kongo2002)
LCD 047 (github: lcd047) LCD 047 (github: lcd047)
Find the latest version of syntastic here: Find the latest version of syntastic at:
http://github.com/scrooloose/syntastic http://github.com/scrooloose/syntastic