Commit Graph

23 Commits

Author SHA1 Message Date
LCD 47
d3354f175c Make syntastic#makeprg#build() aware of filetypes. Fixes #667. 2013-05-31 21:05:45 +03:00
LCD 47
dd6e1c703b Relax parsing of version strings. 2013-05-29 09:55:42 +03:00
Martin Grenfell
602bbe7b24 break down some error format strings
Most errorformats are now expressed 1 "clause" per line.
2013-05-14 17:36:20 +01:00
LCD 47
73a72bdc25 Try to cope with older versions of jshint. 2013-03-26 21:40:20 +02:00
Brian Peiris
96658758d6 Add support for JSHint's secondary error format
JSHint has a secondary error format that includes a number related to the error message.

E.g. The normal error format is something like: 

.\Foo.js: line 2, col 5, Missing semicolon. (W033)

But the secondary error format includes a number in parentheses:

.\Foo.js: line 3, col 4, Blocks are nested too deeply. (2) (W073)"

I've changed the errorformat to read the message until it hits a space, instead of a period, so that these errors are included.
2013-03-19 17:27:38 -03:00
Martin Grenfell
c350107da2 jshint: add a comment version requirements 2013-03-18 09:49:00 +00:00
Josh
f05a277f92 detect warnings in jshint
pass `jshint` the `--verbose` option to get 'W' or 'E' indicating
whether something is a warning or an error.

NOTE: this was tested with jshint 1.1.0 installed with `npm install
jshint`
2013-03-15 16:30:08 -05:00
Martin Grenfell
16424e5761 add guards to all checkers
goddamn I love macros
2013-02-21 15:50:41 +00:00
Martin Grenfell
e0b8e87c93 refactor all the syntax checkers to use the new API and dir layout 2013-01-27 20:08:30 +00:00
Martin Grenfell
5b31495af2 update makeprg builder and update some checkers to use it
update makeprg builder:
* it now accepts `fname`, `tail`, and `post_args` params.
* add some doc above syntastic#makeprg#build
* update a bunch of checkers to use the new params

Still have quite a few checkers that arent using makeprg#build.
Including all c* and a few other c-like checkers. And PHP.

Not to worried about c* as these checkers are complicated and probably
justify having their own logic to build makeprgs.
2013-01-20 12:27:19 +00:00
Martin Grenfell
6a184f0e37 update checkers to use the new syntastic#makeprg#build()
Make all the easy updates. There are still quite a few to do, but in
doing these ones I can see that syntastic#makeprg#build() needs to
accept a few more options. Namely:

* "postargs" that appear after the filename
* "tail" that appears after everything - used for things like
  redirecting output and piping to grep/sed/etc
* the filename itself - only the java checkers needed this since they
  specify the directory of the file to check as well

There are still a few other things to do as well:

* remove the options from the checkers that are now provided by
  syntastic#makeprg#build implicitly - i.e. the checker exe and args.
* also, we need to doc the above implicit checker options
2013-01-20 11:13:01 +00:00
Martin Grenfell
ccecbcb460 javascript/jsl: update conf flag option
Make it so you only have to set g:syntastic_javascript_jsl_conf to
"/path/to/conf" rather than "-conf /path/to/conf"

Closes #405
2012-11-19 22:20:29 +00:00
Motohiro Takayama
0faf1bd47e Added an option: g:syntastic_javascript_closure_compiler_file_list
That variable specify the file which contains a list of filename that
Closure Compiler processes at once.

It can be useful for a project using 'require' statement like node.js.
2012-05-07 13:13:16 -07:00
Motohiro Takayama
3e6687e479 s/gcc/closurecompiler/ 2012-05-06 11:10:57 -07:00
Motohiro Takayama
2d0bb48dd7 1 byte typo. 2012-05-04 18:20:19 -07:00
Motohiro Takayama
243becc5dd Javascript syntax check with Google Closure Compiler. 2012-05-04 18:13:23 -07:00
Martin Grenfell
892cc2c232 refactor the error highlighting system
* remove the public SyntasticHighlightErrors() function
* shift the above code into s:HighlightErrors(). This is called
  automatically if g:syntastic_enable_highlighting is set
* to get the highlight regex we just look for a function called
  Syntastic_<filetype>_GetHighlightRegex
* to force this function to be called, each error item must have the
  'force_highlight_callback' key set

This code has one important functional change: now errors are *always*
highlighted if possible whereas previously they were only highlighted if
a call to SyntasticHighlightErrors was made.
2012-03-02 10:05:15 +00:00
Gilles Ruppert
be1091f251 rather than compare to '' we use the vimscript emtpy function as else the check does not work 2012-02-11 21:45:30 +01:00
Gilles Ruppert
c2c0058973 make the ternary check for the javascript jshint config explicit as else it was not working on my system 2012-02-11 02:27:45 +01:00
Martin Grenfell
c05a36f66c jslint: update for jslint 0.1.4 2012-01-06 19:06:47 +00:00
Martin Grenfell
58cd0d340c update the javascript/jslint syntax checker
The jslint guys have changed their error format again. Update the syntax
checker to handle it.

Currently jslint outputs a "use strict" error if a function doesnt have
'use strict' at the top. This is not good for our purposes, so just
filter this out for now.
2011-12-23 23:09:03 +00:00
millermedeiros
e4adda29f7 fix jshint checker since it was ignoring jshintrc configs. 2011-12-16 16:28:24 -02:00
Martin Grenfell
394d129b55 refactor the javascript syntax checkers
The js syntax checker was 4 checkers stuffed into 1 file. Now it is
broken down so that each checker is in its own file inside
syntax_checkers/javascript/ while syntax_checkers/javascript.vim just
determines which file to source.

Change the names of the global js checker config variables so that
they all start with "syntastic_javascript_". This is purely for
namespacing.

Remove some unneeded logic around the config variables too. Not sure how
it got in there, but it was more confusing than helpful without offering
any benefits...
2011-12-11 22:54:33 +00:00