Syntastic: shellcheck should have the -x option

Created on 5 Feb 2017  路  6Comments  路  Source: vim-syntastic/syntastic

When sourcing an other file, shellcheck has the ability to follow the sourced file thanks to the directive
# shellcheck source=/path/to/file
To follow the source, shellcheck must be used with the -x option, or the warning SC1091 is triggered.

Is it possible to add this option by default? Or provide an easy way to enable the option?

Most helpful comment

Just in case if somebody will need this in the future.

Option to enable this will be let g:syntastic_sh_shellcheck_args="-x"

All 6 comments

Please read :h syntastic-sh-shellcheck and :h syntastic-config-makeprg.

Thank you for the doc.
Would it be a good thing to have this option by default?
If yes, I can provide a pull request.

Would it be a good thing to have this option by default?

I suppose that would be a good question for the author of shellcheck. As far as syntastic is concerned, defaults should change only for very strong reasons. Otherwise somebody else would have to change his setup because it doesn't match your preferences. _shrug_

Just in case if somebody will need this in the future.

Option to enable this will be let g:syntastic_sh_shellcheck_args="-x"

let g:syntastic_sh_shellcheck_args="-x"

How to change this ? please give me the steps

let g:syntastic_sh_shellcheck_args="-x"

How to change this ? please give me the steps

Edit your ~/.vimrc and add the line of let g:syntastic_sh_shellcheck_args="-x"
I just confirmed that It works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jasonkuhrt picture jasonkuhrt  路  8Comments

mollerhoj picture mollerhoj  路  5Comments

HabbaRazzer picture HabbaRazzer  路  5Comments

duckpuppy picture duckpuppy  路  8Comments

yusijs picture yusijs  路  5Comments