From f05a277f929b89385bdc5e35517b8681b54e3145 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 15 Mar 2013 16:25:04 -0500 Subject: [PATCH] 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` --- syntax_checkers/javascript/jshint.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/javascript/jshint.vim b/syntax_checkers/javascript/jshint.vim index 9f2e068e..0848de40 100644 --- a/syntax_checkers/javascript/jshint.vim +++ b/syntax_checkers/javascript/jshint.vim @@ -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