Skip to content
Discussion options

You must be logged in to vote

zsh is already aliased to sh by ALE's default linter aliases, so the alias is probably not the missing part here.

The clue in your :ALEInfo is this line:

Enabled Linters: ['shell']

That is not ShellCheck. It means ALE is using the shell linter path, so diagnostics such as unquoted variables will usually not appear. Enable ShellCheck explicitly and force the dialect you want:

let g:ale_linters = {
\   'zsh': ['shellcheck'],
\}
let g:ale_sh_shellcheck_dialect = 'bash'

Use 'sh' instead of 'bash' if you want POSIX sh rules.

If this is only for one buffer/filetype override, this also works:

let b:ale_linter_aliases = 'sh'
let b:ale_linters = ['shellcheck']
let b:ale_sh_shellcheck_dialect = 'bash'

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@vincentjorgensen
Comment options

@krotname
Comment options

Answer selected by vincentjorgensen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants