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`
This commit is contained in:
Josh 2013-03-15 16:25:04 -05:00
parent 2519d83569
commit f05a277f92

View File

@ -24,10 +24,10 @@ endfunction
function! SyntaxCheckers_javascript_jshint_GetLocList()
let makeprg = syntastic#makeprg#build({
\ 'exe': 'jshint',
\ 'post_args': s:Args(),
\ 'post_args': ' --verbose ' . s:Args(),
\ 'subchecker': 'jshint' })
let errorformat = '%ELine %l:%c,%Z\\s%#Reason: %m,%C%.%#,%f: line %l\, col %c\, %m,%-G%.%#'
let errorformat = '%f: line %l\, col %c\, %m. \(%t%*\d\)'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
endfunction