Bruno BELANYI
4753e32c30
I want shellcheck to detect which shell is most appropriate on the `sh` filetype, but explicitly use the `bash` dialect on `bash` and `zsh` filetypes. I also really don't like nullary conditions in shell, so I'll screen for those too. I might turn on the 'quote-safe-variables' check too, because I think quoting variables is a good habit to take.
9 lines
330 B
VimL
9 lines
330 B
VimL
" Use shfmt as ALE fixer for bash
|
|
let b:ale_fixers=[ 'shfmt' ]
|
|
|
|
" Indent with 4 spaces, simplify script, indent switch cases, use Bash variant
|
|
let b:ale_sh_shfmt_options='-i 4 -s -ci -ln bash'
|
|
|
|
" Use bash dialect explicitly, require explicit empty string test
|
|
let b:ale_sh_shellcheck_options='-s bash -o avoid-nullary-conditions'
|