mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Support ale_sh_shellcheck_dialect to set dialect
As discussed in w0rp/ale#1051, there are cases where it would be useful to be able to specify the dialect explicitly. This commit allows users to do so using the ale_sh_shellcheck_dialect variable. Fixes: w0rp/ale#1051 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
@@ -33,6 +33,18 @@ Execute(The shellcheck command should include the dialect):
|
||||
AssertLinter 'shellcheck',
|
||||
\ b:prefix . ale#Escape('shellcheck') . ' -s bash' . b:suffix
|
||||
|
||||
Execute(The shellcheck command should use ale_sh_shellcheck_dialect):
|
||||
let b:ale_sh_shellcheck_dialect = 'ksh93'
|
||||
|
||||
AssertLinter 'shellcheck',
|
||||
\ b:prefix . ale#Escape('shellcheck') . ' -s ksh93' . b:suffix
|
||||
|
||||
Execute(The shellcheck command should allow unspecified dialect):
|
||||
let b:ale_sh_shellcheck_dialect = ''
|
||||
|
||||
AssertLinter 'shellcheck',
|
||||
\ b:prefix . ale#Escape('shellcheck') . b:suffix
|
||||
|
||||
Execute(The shellcheck command should include the dialect before options and exclusions):
|
||||
let b:is_bash = 1
|
||||
let b:ale_sh_shellcheck_options = '--foobar'
|
||||
|
||||
Reference in New Issue
Block a user