简体   繁体   中英

Vim syntastic is not showing warning messages

This is my current syntastic configuration:

let g:syntastic_check_on_open=1
let g:syntastic_quiet_messages = { "level": [] }
let g:syntastic_aggregate_errors = 1
let g:syntastic_javascript_checkers = ['jshint', 'jslint']
let g:syntastic_warning_symbol = 'WW'
let g:syntastic_error_symbol = 'EE'

The problem that I have is that, it shows only error messages in my javascript files:

For example:

% jslint web/js/app.js

web/js/app.js
 #1 'define' was used before it was defined.
    define([ // Line 1, Pos 1
 #2 Expected exactly one space between 'function' and '('.
    RestangularProvider.setResponseExtractor(function(response, operation) { // Line 73, Pos 58

but when I open the file in vim i see only the message #1 'define' was used before it was defined. , not the second one.

What should I do to enable warnings to be shown too?

Syntastic uses the following command line options to jslint by default:

--white --nomen --regexp --plusplus --bitwise --newcap --sloppy --vars

(see syntastic/syntax_checkers/javascript/jslint.vim ). You can set your own options via

let g:syntastic_javscript_jslint_args = "--foo --bar --baz"

The --white from the defaults is what suppresses your second warning

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM