]> git.madduck.net Git - etc/vim.git/blob - doc/ale-sh.txt

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / doc / ale-sh.txt
1 ===============================================================================
2 ALE Shell Integration                                          *ale-sh-options*
3
4
5 ===============================================================================
6 bashate                                                        *ale-sh-bashate*
7
8                                             *ale-options.sh_bashate_executable*
9                                                   *g:ale_sh_bashate_executable*
10                                                   *b:ale_sh_bashate_executable*
11 sh_bashate_executable
12 g:ale_sh_bashate_executable
13   Type: |String|
14   Default: `'bashate'`
15
16   This variable sets executable used for bashate.
17
18                                                *ale-options.sh_bashate_options*
19                                                      *g:ale_sh_bashate_options*
20                                                      *b:ale_sh_bashate_options*
21 sh_bashate_options
22 g:ale_sh_bashate_options
23   Type: |String|
24   Default: `''`
25
26   With this variable we are able to pass extra arguments for bashate. For
27   example to ignore the indentation rule: >
28
29   let g:ale_sh_bashate_options = '-i E003'
30 <
31
32 ===============================================================================
33 cspell                                                          *ale-sh-cspell*
34
35 See |ale-cspell-options|
36
37
38 ===============================================================================
39 sh-language-server                                     *ale-sh-language-server*
40
41                                     *ale-options.sh_language_server_executable*
42                                           *g:ale_sh_language_server_executable*
43                                            *b:ale_sh_language_server_executable*
44 sh_language_server_executable
45 g:ale_sh_language_server_executable
46   Type: |String|
47   Default: `'bash-language-server'`
48
49   See |ale-integrations-local-executables|
50
51                                     *ale-options.sh_language_server_use_global*
52                                           *g:ale_sh_language_server_use_global*
53                                            *b:ale_sh_language_server_use_global*
54 sh_language_server_use_global
55 g:ale_sh_language_server_use_global
56   Type: |Number|
57   Default: `get(g:, 'ale_use_global_executables', 0)`
58
59   See |ale-integrations-local-executables|
60
61
62 ===============================================================================
63 shell                                                            *ale-sh-shell*
64
65                                            *ale-options.sh_shell_default_shell*
66                                                  *g:ale_sh_shell_default_shell*
67                                                  *b:ale_sh_shell_default_shell*
68 sh_shell_default_shell
69 g:ale_sh_shell_default_shell
70   Type: |String|
71   Default: The current shell (`$SHELL`). Falls back to `'bash'` if that cannot be
72   read or if the current shell is `'fish'`.
73
74   When ALE runs the linter for shells with the `-n` flag, it will attempt to
75   read the shell from the shebang (`#!`) line from the shell script to
76   determine the shell program to run. When this detection fails, this variable
77   will be used instead.
78
79
80 ===============================================================================
81 shellcheck                                                  *ale-sh-shellcheck*
82
83                                          *ale-options.sh_shellcheck_executable*
84                                                *g:ale_sh_shellcheck_executable*
85                                                *b:ale_sh_shellcheck_executable*
86 sh_shellcheck_executable
87 g:ale_sh_shellcheck_executable
88   Type: |String|
89   Default: `'shellcheck'`
90
91   This variable sets executable used for shellcheck.
92
93                                             *ale-options.sh_shellcheck_options*
94                                                   *g:ale_sh_shellcheck_options*
95                                                   *b:ale_sh_shellcheck_options*
96 sh_shellcheck_options
97 g:ale_sh_shellcheck_options
98   Type: |String|
99   Default: `''`
100
101   With this variable we are able to pass extra arguments for shellcheck
102   for shellcheck invocation.
103
104   For example, if we want shellcheck to follow external sources (`see SC1091`)
105   we can set the variable as such: >
106
107   let g:ale_sh_shellcheck_options = '-x'
108 <
109                                    *ale-options.sh_shellcheck_change_directory*
110                                          *g:ale_sh_shellcheck_change_directory*
111                                          *b:ale_sh_shellcheck_change_directory*
112 sh_shellcheck_change_directory
113 g:ale_sh_shellcheck_change_directory
114   Type: |Number|
115   Default: `1`
116
117   If set to `1`, ALE will switch to the directory the shell file being
118   checked with `shellcheck` is in before checking it. This helps `shellcheck`
119   determine the path to sourced files more easily. This option can be turned
120   off if you want to control the directory `shellcheck` is executed from
121   yourself.
122
123                                             *ale-options.sh_shellcheck_dialect*
124                                                   *g:ale_sh_shellcheck_dialect*
125                                                   *b:ale_sh_shellcheck_dialect*
126 sh_shellcheck_dialect
127 g:ale_sh_shellcheck_dialect
128   Type: |String|
129   Default: `'auto'`
130
131   This variable specifies the shellcheck dialect (`-s` option).  The value
132   `'auto'` causes ALE to detect the dialect automatically, based on the shebang
133   line (if present) or the value of `b:is_bash`, `b:is_sh`, or `b:is_kornshell`
134   (set and used by |sh.vim|).
135
136                                          *ale-options.sh_shellcheck_exclusions*
137                                                *g:ale_sh_shellcheck_exclusions*
138                                                *b:ale_sh_shellcheck_exclusions*
139 sh_shellcheck_exclusions
140 g:ale_sh_shellcheck_exclusions
141   Type: |String|
142   Default: `''`
143
144   Set this variable to exclude test(s) for shellcheck (-e/--exclude option).
145   To exclude more than one option, separate them with commas.
146
147   For example, to ignore some warnings that aren't applicable to files that
148   will be sourced by other scripts, use the buffer-local variant: >
149
150     autocmd BufEnter PKGBUILD,.env
151     \   let b:ale_sh_shellcheck_exclusions = 'SC2034,SC2154,SC2164'
152 <
153
154 ===============================================================================
155 shfmt                                                            *ale-sh-shfmt*
156
157                                                  *ale-options.sh_shfmt_options*
158                                                        *g:ale_sh_shfmt_options*
159                                                        *b:ale_sh_shfmt_options*
160 sh_shfmt_options
161 g:ale_sh_shfmt_options
162   Type: |String|
163   Default: `''`
164
165   This variable can be set to pass additional options to the shfmt fixer.
166
167
168 ===============================================================================
169   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: