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?
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.
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"