Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I turn off specific messages in syntastic (vim)?

Tags:

vim

syntastic

I'm trying to turn off some of the messages in syntastic.

For example, SC20148 in bash files (it complains there's no shebang).

After looking through the documentation, it seemed that perhaps this might be done through:

let g:synstatic_quiet_messages = {
  \ 'type': 'syntax',
  \ 'regex': 'SC20148' }

However this doesn't seem to work. How do I turn off specific messages?

like image 724
nfarrar Avatar asked Feb 02 '15 16:02

nfarrar


2 Answers

The Devil is in the details:

  1. the variable is actually called g:syntastic_quiet_messages
  2. the error is actually SC2148
  3. you probably don't want to disable syntax messages.

Thus:

let g:syntastic_quiet_messages = { 'regex': 'SC2148' }

Or just:

let g:syntastic_sh_shellcheck_args = '-e SC2148'
like image 127
lcd047 Avatar answered Nov 15 '22 21:11

lcd047


Turn off multiple kinds of warnings in syntastic in vim:

Add this line to your .vimrc

let g:syntastic_quiet_messages = { 'regex': 'SC2148\|SC1234\|SC6789' }

Also you can do it against the message itself like this:

let g:syntastic_quiet_messages = { "regex": 'superfluous-parens\|too-many-instance-attributes\|too-few-public-methods' }
like image 27
Eric Leschinski Avatar answered Nov 15 '22 20:11

Eric Leschinski