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:
parent
2519d83569
commit
f05a277f92
@ -24,10 +24,10 @@ endfunction
|
|||||||
function! SyntaxCheckers_javascript_jshint_GetLocList()
|
function! SyntaxCheckers_javascript_jshint_GetLocList()
|
||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'jshint',
|
\ 'exe': 'jshint',
|
||||||
\ 'post_args': s:Args(),
|
\ 'post_args': ' --verbose ' . s:Args(),
|
||||||
\ 'subchecker': 'jshint' })
|
\ '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('')} })
|
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user