2017-03-28 22:25:44 +00:00
|
|
|
===============================================================================
|
|
|
|
ALE Shell Integration *ale-sh-options*
|
|
|
|
|
|
|
|
|
2020-03-23 03:18:35 +00:00
|
|
|
===============================================================================
|
|
|
|
bashate *ale-sh-bashate*
|
|
|
|
|
|
|
|
g:ale_sh_bashate_executable *g:ale_sh_bashate_executable*
|
|
|
|
*b:ale_sh_bashate_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'bashate'`
|
|
|
|
|
|
|
|
This variable sets executable used for bashate.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_sh_bashate_options *g:ale_sh_bashate_options*
|
|
|
|
*b:ale_sh_bashate_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
With this variable we are able to pass extra arguments for bashate. For
|
|
|
|
example to ignore the indentation rule:
|
|
|
|
|
|
|
|
>
|
2020-07-30 14:00:20 +00:00
|
|
|
let g:ale_sh_bashate_options = '-i E003'
|
2020-03-23 03:18:35 +00:00
|
|
|
<
|
|
|
|
|
2018-06-07 17:55:43 +00:00
|
|
|
===============================================================================
|
|
|
|
sh-language-server *ale-sh-language-server*
|
|
|
|
|
|
|
|
g:ale_sh_language_server_executable *g:ale_sh_language_server_executable*
|
|
|
|
*b:ale_sh_language_server_executable*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'bash-language-server'`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_sh_language_server_use_global *g:ale_sh_language_server_use_global*
|
|
|
|
*b:ale_sh_language_server_use_global*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `get(g:, 'ale_use_global_executables', 0)`
|
|
|
|
|
|
|
|
See |ale-integrations-local-executables|
|
|
|
|
|
|
|
|
|
2017-07-08 13:17:26 +00:00
|
|
|
===============================================================================
|
2017-03-28 22:25:44 +00:00
|
|
|
shell *ale-sh-shell*
|
|
|
|
|
2017-04-29 18:57:34 +00:00
|
|
|
g:ale_sh_shell_default_shell *g:ale_sh_shell_default_shell*
|
|
|
|
*b:ale_sh_shell_default_shell*
|
2017-03-28 22:25:44 +00:00
|
|
|
Type: |String|
|
2017-05-02 22:34:17 +00:00
|
|
|
Default: The current shell (`$SHELL`). Falls back to `'bash'` if that cannot be
|
|
|
|
read or if the current shell is `'fish'`.
|
2017-03-28 22:25:44 +00:00
|
|
|
|
|
|
|
When ALE runs the linter for shells with the `-n` flag, it will attempt to
|
|
|
|
read the shell from the shebang (`#!`) line from the shell script to
|
|
|
|
determine the shell program to run. When this detection fails, this variable
|
|
|
|
will be used instead.
|
|
|
|
|
|
|
|
|
2017-07-08 13:17:26 +00:00
|
|
|
===============================================================================
|
2017-03-28 22:25:44 +00:00
|
|
|
shellcheck *ale-sh-shellcheck*
|
|
|
|
|
2017-04-09 17:54:25 +00:00
|
|
|
g:ale_sh_shellcheck_executable *g:ale_sh_shellcheck_executable*
|
2017-04-27 21:04:34 +00:00
|
|
|
*b:ale_sh_shellcheck_executable*
|
2017-04-09 17:54:25 +00:00
|
|
|
Type: |String|
|
|
|
|
Default: `'shellcheck'`
|
|
|
|
|
|
|
|
This variable sets executable used for shellcheck.
|
|
|
|
|
|
|
|
|
|
|
|
g:ale_sh_shellcheck_options *g:ale_sh_shellcheck_options*
|
2017-04-27 21:04:34 +00:00
|
|
|
*b:ale_sh_shellcheck_options*
|
2017-04-09 17:54:25 +00:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
With this variable we are able to pass extra arguments for shellcheck
|
|
|
|
for shellcheck invocation.
|
|
|
|
|
|
|
|
For example, if we want shellcheck to follow external sources (`see SC1091`)
|
|
|
|
we can set the variable as such:
|
2017-04-27 21:04:34 +00:00
|
|
|
>
|
2017-04-09 17:54:25 +00:00
|
|
|
let g:ale_sh_shellcheck_options = '-x'
|
2017-04-27 21:04:34 +00:00
|
|
|
<
|
2017-04-09 17:54:25 +00:00
|
|
|
|
2019-02-10 16:00:55 +00:00
|
|
|
|
2019-04-18 22:48:10 +00:00
|
|
|
g:ale_sh_shellcheck_change_directory *g:ale_sh_shellcheck_change_directory*
|
|
|
|
*b:ale_sh_shellcheck_change_directory*
|
|
|
|
Type: |Number|
|
|
|
|
Default: `1`
|
|
|
|
|
|
|
|
If set to `1`, ALE will switch to the directory the shell file being
|
|
|
|
checked with `shellcheck` is in before checking it. This helps `shellcheck`
|
|
|
|
determine the path to sourced files more easily. This option can be turned
|
|
|
|
off if you want to control the directory `shellcheck` is executed from
|
|
|
|
yourself.
|
|
|
|
|
|
|
|
|
2019-02-10 16:00:55 +00:00
|
|
|
g:ale_sh_shellcheck_dialect *g:ale_sh_shellcheck_dialect*
|
|
|
|
*b:ale_sh_shellcheck_dialect*
|
|
|
|
Type: |String|
|
|
|
|
Default: `'auto'`
|
|
|
|
|
|
|
|
This variable specifies the shellcheck dialect (`-s` option). The value
|
|
|
|
`'auto'` causes ALE to detect the dialect automatically, based on the shebang
|
|
|
|
line (if present) or the value of `b:is_bash`, `b:is_sh`, or `b:is_kornshell`
|
|
|
|
(set and used by |sh.vim|).
|
|
|
|
|
|
|
|
|
2017-04-29 18:57:34 +00:00
|
|
|
g:ale_sh_shellcheck_exclusions *g:ale_sh_shellcheck_exclusions*
|
|
|
|
*b:ale_sh_shellcheck_exclusions*
|
2017-03-28 22:25:44 +00:00
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
Set this variable to exclude test(s) for shellcheck (-e/--exclude option).
|
2017-04-09 17:54:25 +00:00
|
|
|
To exclude more than one option, separate them with commas.
|
2017-03-28 22:25:44 +00:00
|
|
|
|
2017-04-27 21:04:34 +00:00
|
|
|
For example, to ignore some warnings that aren't applicable to files that
|
|
|
|
will be sourced by other scripts, use the buffer-local variant:
|
|
|
|
>
|
|
|
|
autocmd BufEnter PKGBUILD,.env
|
2017-04-29 18:57:34 +00:00
|
|
|
\ let b:ale_sh_shellcheck_exclusions = 'SC2034,SC2154,SC2164'
|
2017-04-27 21:04:34 +00:00
|
|
|
<
|
2017-03-28 22:25:44 +00:00
|
|
|
|
2017-11-05 21:24:41 +00:00
|
|
|
===============================================================================
|
|
|
|
shfmt *ale-sh-shfmt*
|
|
|
|
|
|
|
|
g:ale_sh_shfmt_options *g:ale_sh_shfmt_options*
|
|
|
|
*b:ale_sh_shfmt_options*
|
|
|
|
Type: |String|
|
|
|
|
Default: `''`
|
|
|
|
|
|
|
|
This variable can be set to pass additional options to the shfmt fixer.
|
|
|
|
|
|
|
|
|
2017-07-08 13:17:26 +00:00
|
|
|
===============================================================================
|
2017-03-28 22:25:44 +00:00
|
|
|
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|