Commit Graph

11 Commits

Author SHA1 Message Date
Martin Grenfell
10c845d1f5 add a makeprg builder
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'`
2013-01-02 13:05:27 +00:00
David Barnett
dcac33ecc0 Set g:loaded_FOO_syntax_checker in syntastic.vim, not every ft file. 2012-11-26 21:44:43 -08:00
Martin Grenfell
5ea166c324 coffee checker: refactor and change the coffee_lint option name
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.
2012-07-24 10:05:38 +01:00
Martin Grenfell
39cfb51a7c coffee checker: fix mixed indenting 2012-07-24 09:51:35 +01:00
Brendan Erwin
4cc6d8b4ce Improved the behavior per suggestions 2012-07-18 20:45:34 -04:00
Brendan Erwin
4310146a99 Include CoffeeLint if available.
Respects the same options configuration as the vim-coffee-script plugin.
2012-07-14 19:15:38 -03:00
Darcy Parker
10bc9fea44 shellescaped(expand()) the filename passed to coffee 2012-01-13 11:25:48 -05:00
Martin Grenfell
62ef08d334 make a fix to the coffee checker
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.
2011-12-04 01:40:12 +00:00
Tom Wieland
e4ec40479a coffee -o doesn't take /dev/null, only directories. 2011-06-29 16:30:58 -07:00
Lincoln Stoll
8dfedc98b9 Update coffee error format 2010-10-13 18:22:38 +08:00
Lincoln Stoll
b643ab10de First cut at coffee script checker 2010-10-13 18:22:37 +08:00