The problem
---
Some people want to change the syntax checker args and/or executable.
Currently they have to create their own checker to do this.
Solution
---
Create a standard API for building a makeprg that allows users to set
global variables to override the exe or args.
This API is in use in the coffee and python/flake8 checkers - as
proofs of concept.
So, if the user wanted to change the args that get passed to `flake8`
they can now set `let g:syntastic_python_flake8_args="--foo --bar"` in
their vimrc. Similarly they could set `let
g:syntastic_python_flake8_exe='python foo.py'`
Move the coffeelint code out into its own function.
Init the coffeelint option once, at the top of the script. Change its
name so it begins with "syntastic_" - for namespacing purposes.
This is in response to #88 where errors like this were getting missed:
SyntaxError: In simpleMapComponent.js.coffee, Reserved word "function" on line 10
at SyntaxError (unknown source)
at Lexer.identifierError (/usr/lib/node_modules/coffee-script/lib/lexer.js:458:13)
at Lexer.identifierToken (/usr/lib/node_modules/coffee-script/lib/lexer.js:80:16)
at Lexer.tokenize (/usr/lib/node_modules/coffee-script/lib/lexer.js:31:19)
at Object.compile (/usr/lib/node_modules/coffee-script/lib/coffee-script.js:29:34)
at /usr/lib/node_modules/coffee-script/lib/command.js:149:33
at /usr/lib/node_modules/coffee-script/lib/command.js:115:26
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
To fix this I have added another error matcher on the front of the
errorformat and have made a fix to the %-G matcher on the end (i.e. it
wasnt actually matching anything before).
The errorformat may need more updating.