fix jshint checker since it was ignoring jshintrc configs.

This commit is contained in:
millermedeiros 2011-12-16 16:28:24 -02:00
parent 761e8e4a19
commit e4adda29f7
2 changed files with 5 additions and 1 deletions

View File

@ -342,6 +342,8 @@ The latest dev versions are on github
Next
- auto close location list when leaving buffer. (millermedeiros)
- updates/fixes to existing checkers:
- javascript (millermedeiros)
2.1.0
- when the cursor is on a line containing an error, echo the

View File

@ -13,7 +13,9 @@ if !exists("g:syntastic_javascript_jshint_conf")
endif
function! SyntaxCheckers_javascript_GetLocList()
let makeprg = 'jshint ' . shellescape(expand("%")) . ' --config ' . g:syntastic_javascript_jshint_conf
" node-jshint uses .jshintrc as config unless --config arg is present
let args = g:syntastic_javascript_jshint_conf? ' --config ' . g:syntastic_javascript_jshint_conf : ''
let makeprg = 'jshint ' . shellescape(expand("%")) . args
let errorformat = '%ELine %l:%c,%Z\\s%#Reason: %m,%C%.%#,%f: line %l\, col %c\, %m,%-G%.%#'
return SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat, 'defaults': {'bufnr': bufnr('')} })
endfunction