]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/doc/ale-yaml.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:

Merge commit '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / doc / ale-yaml.txt
1 ===============================================================================
2 ALE YAML Integration                                         *ale-yaml-options*
3
4
5 ===============================================================================
6 actionlint                                                *ale-yaml-actionlint*
7
8 Website: https://github.com/rhysd/actionlint
9
10
11 Installation
12 -------------------------------------------------------------------------------
13
14 See installation guide: https://github.com/rhysd/actionlint#quick-start
15
16 This linter is disabled by default and must be enabled by setting `g:ale_linters`.
17 To enable it only for Github Action YAML files a configuration like this is
18 better:
19
20 >
21  au BufRead,BufNewFile */.github/*/*.y{,a}ml
22                                 \ let b:ale_linters = {'yaml': ['actionlint']}
23 <
24
25 -------------------------------------------------------------------------------
26 Options
27                                        *ale-options.yaml_actionlint_executable*
28                                              *g:ale_yaml_actionlint_executable*
29                                              *b:ale_yaml_actionlint_executable*
30 yaml_actionlint_executable
31 g:ale_yaml_actionlint_executable
32   Type: |String|
33   Default: `'actionlint'`
34
35   This variable can be set to change the path to actionlint.
36
37                                           *ale-options.yaml_actionlint_options*
38                                                 *g:ale_yaml_actionlint_options*
39                                                 *b:ale_yaml_actionlint_options*
40 yaml_actionlint_options
41 g:ale_yaml_actionlint_options
42   Type: |String|
43   Default: `''`
44
45   This variable can be set to add extra options to actionlint executable.
46
47   For example, to disable running `shellcheck` and `pyflakes` external commands,
48   you may want to set:
49 >
50   let g:ale_yaml_actionlint_options = '-shellcheck= -pyflakes='
51 <
52   Please note that passing `-format` as option is not supported at the moment.
53
54
55 ===============================================================================
56 circleci                                                    *ale-yaml-circleci*
57
58 Website: https://circleci.com/docs/2.0/local-cli
59
60
61 Installation
62 -------------------------------------------------------------------------------
63
64 Follow the instructions on the website, and make sure to test that you can
65 validate configuration files with: >
66
67   circleci config validate - < .circleci/config.yml
68 <
69
70 As long as the validator runs correctly, you should be able to see errors when
71 you save the configuration file. The validator doesn't run as you type because
72 it sends network requests, and running too often would overload the circleci
73 servers.
74
75
76 ===============================================================================
77 prettier                                                    *ale-yaml-prettier*
78
79 Website: https://github.com/prettier/prettier
80
81
82 Installation
83 -------------------------------------------------------------------------------
84
85 Install prettier either globally or locally: >
86
87   npm install prettier -g  # global
88   npm install prettier     # local
89 <
90
91 ===============================================================================
92 spectral                                                    *ale-yaml-spectral*
93
94 Website: https://github.com/stoplightio/spectral
95
96
97 Installation
98 -------------------------------------------------------------------------------
99
100 Install spectral either globally or locally: >
101
102   npm install @stoplight/spectral -g  # global
103   npm install @stoplight/spectral     # local
104 <
105
106 -------------------------------------------------------------------------------
107 Options
108                                          *ale-options.yaml_spectral_executable*
109                                                *g:ale_yaml_spectral_executable*
110                                                *b:ale_yaml_spectral_executable*
111 yaml_spectral_executable
112 g:ale_yaml_spectral_executable
113   Type: |String|
114   Default: `'spectral'`
115
116   This variable can be set to change the path to spectral.
117
118                                          *ale-options.yaml_spectral_use_global*
119                                                *g:ale_yaml_spectral_use_global*
120                                                *b:ale_yaml_spectral_use_global*
121 yaml_spectral_use_global
122 g:ale_yaml_spectral_use_global
123   Type: |String|
124   Default: `get(g:, 'ale_use_global_executables', 0)`
125
126   See |ale-integrations-local-executables|
127
128
129 ===============================================================================
130 swaglint                                                    *ale-yaml-swaglint*
131
132 Website: https://github.com/byCedric/swaglint
133
134
135 Installation
136 -------------------------------------------------------------------------------
137
138 Install swaglint either globally or locally: >
139
140   npm install swaglint -g  # global
141   npm install swaglint     # local
142 <
143
144 -------------------------------------------------------------------------------
145 Options
146                                          *ale-options.yaml_swaglint_executable*
147                                                *g:ale_yaml_swaglint_executable*
148                                                *b:ale_yaml_swaglint_executable*
149 yaml_swaglint_executable
150 g:ale_yaml_swaglint_executable
151   Type: |String|
152   Default: `'swaglint'`
153
154   This variable can be set to change the path to swaglint.
155
156                                          *ale-options.yaml_swaglint_use_global*
157                                                *g:ale_yaml_swaglint_use_global*
158                                                *b:ale_yaml_swaglint_use_global*
159 yaml_swaglint_use_global
160 g:ale_yaml_swaglint_use_global
161   Type: |String|
162   Default: `get(g:, 'ale_use_global_executables', 0)`
163
164   See |ale-integrations-local-executables|
165
166
167 ===============================================================================
168 yaml-language-server                                 *ale-yaml-language-server*
169
170 Website: https://github.com/redhat-developer/yaml-language-server
171
172
173 Installation
174 -------------------------------------------------------------------------------
175
176 Install yaml-language-server either globally or locally: >
177
178   npm install yaml-language-server -g  # global
179   npm install yaml-language-server     # local
180
181
182 -------------------------------------------------------------------------------
183 Options
184                                                *ale-options.yaml_ls_executable*
185                                                      *g:ale_yaml_ls_executable*
186                                                      *b:ale_yaml_ls_executable*
187 yaml_ls_executable
188 g:ale_yaml_ls_executable
189   Type: |String|
190   Default: `'yaml-language-server'`
191
192   This variable can be set to change the path to yaml-language-server.
193
194                                                    *ale-options.yaml_ls_config*
195                                                          *g:ale_yaml_ls_config*
196                                                          *b:ale_yaml_ls_config*
197 yaml_ls_config
198 g:ale_yaml_ls_config
199   Type: |Dictionary|
200   Default: `{}`
201
202   A Dictionary for settings to pass to the language server. For example, to
203   enable the schema store, you can do use the following in your yaml ftplugin
204   file: >
205
206   let b:ale_yaml_ls_config = {
207   \   'yaml': {
208   \       'schemaStore': {
209   \           'enable': v:true,
210   \       },
211   \   },
212   \}
213 <
214   Or in Lua: >
215
216   require("ale").setup.buffer({
217       yaml_ls_config = {
218           yaml = {
219               schemaStore = {
220                   enable = true,
221               },
222           },
223       },
224   })
225 <
226   Consult the yaml-language-server documentation for more information about
227   settings.
228
229                                                *ale-options.yaml_ls_use_global*
230                                                      *g:ale_yaml_ls_use_global*
231                                                      *b:ale_yaml_ls_use_global*
232 yaml_ls_use_global
233 g:ale_yaml_ls_use_global
234   Type: |String|
235   Default: `get(g:, 'ale_use_global_executables', 0)`
236
237   See |ale-integrations-local-executables|
238
239
240 ===============================================================================
241 yamlfix                                                      *ale-yaml-yamlfix*
242
243 Website: https://lyz-code.github.io/yamlfix
244
245
246 Installation
247 -------------------------------------------------------------------------------
248
249 Install yamlfix: >
250
251   pip install yamlfix
252 <
253
254 -------------------------------------------------------------------------------
255 Options
256                                           *ale-options.yaml_yamlfix_executable*
257                                                 *g:ale_yaml_yamlfix_executable*
258                                                 *b:ale_yaml_yamlfix_executable*
259 yaml_yamlfix_executable
260 g:ale_yaml_yamlfix_executable
261   Type: |String|
262   Default: `'yamlfix'`
263
264   See |ale-integrations-local-executables|
265
266                                              *ale-options.yaml_yamlfix_options*
267                                                    *g:ale_yaml_yamlfix_options*
268                                                    *b:ale_yaml_yamlfix_options*
269 yaml_yamlfix_options
270 g:ale_yaml_yamlfix_options
271   Type: |String|
272   Default: `''`
273
274   This variable can be set to pass extra options to yamlfix.
275
276                                           *ale-options.yaml_yamlfix_use_global*
277                                                 *g:ale_yaml_yamlfix_use_global*
278                                                 *b:ale_yaml_yamlfix_use_global*
279 yaml_yamlfix_use_global
280 g:ale_yaml_yamlfix_use_global
281   Type: |Number|
282   Default: `get(g:, 'ale_use_global_executables', 0)`
283
284   See |ale-integrations-local-executables|
285
286
287 ===============================================================================
288 yamlfmt                                                      *ale-yaml-yamlfmt*
289
290 Website: https://github.com/google/yamlfmt
291
292
293 -------------------------------------------------------------------------------
294 Installation
295
296 Install yamlfmt:
297
298   See the website.
299
300
301 -------------------------------------------------------------------------------
302 Options
303                                           *ale-options.yaml_yamlfmt_executable*
304                                                 *g:ale_yaml_yamlfmt_executable*
305                                                 *b:ale_yaml_yamlfmt_executable*
306 yaml_yamlfmt_executable
307 g:ale_yaml_yamlfmt_executable
308   Type: |String|
309   Default: `'yamlfmt'`
310
311   See |ale-integrations-local-executables|
312
313                                              *ale-options.yaml_yamlfmt_options*
314                                                    *g:ale_yaml_yamlfmt_options*
315                                                    *b:ale_yaml_yamlfmt_options*
316 yaml_yamlfmt_options
317 g:ale_yaml_yamlfmt_options
318   Type: |String|
319   Default: `''`
320
321   This variable can be set to pass extra options to yamlfmt.
322
323                                           *ale-options.yaml_yamlfmt_use_global*
324                                                 *g:ale_yaml_yamlfmt_use_global*
325                                                 *b:ale_yaml_yamlfmt_use_global*
326 yaml_yamlfmt_use_global
327 g:ale_yaml_yamlfmt_use_global
328   Type: |Number|
329   Default: `get(g:, 'ale_use_global_executables', 0)`
330
331   See |ale-integrations-local-executables|
332
333
334 ===============================================================================
335 yamllint                                                    *ale-yaml-yamllint*
336
337 Website: https://github.com/adrienverge/yamllint
338
339
340 -------------------------------------------------------------------------------
341 Installation
342
343 Install yamllint in your a virtualenv directory, locally, or globally: >
344
345   pip install yamllint # After activating virtualenv
346   pip install --user yamllint # Install to ~/.local/bin
347   sudo pip install yamllint # Install globally
348
349 See |g:ale_virtualenv_dir_names| for configuring how ALE searches for
350 virtualenv directories.
351
352
353 -------------------------------------------------------------------------------
354 Options
355                                          *ale-options.yaml_yamllint_executable*
356                                                *g:ale_yaml_yamllint_executable*
357                                                *b:ale_yaml_yamllint_executable*
358 yaml_yamllint_executable
359 g:ale_yaml_yamllint_executable
360   Type: |String|
361   Default: `'yamllint'`
362
363   This variable can be set to change the path to yamllint.
364
365                                             *ale-options.yaml_yamllint_options*
366                                                   *g:ale_yaml_yamllint_options*
367                                                   *b:ale_yaml_yamllint_options*
368 yaml_yamllint_options
369 g:ale_yaml_yamllint_options
370   Type: |String|
371   Default: `''`
372
373   This variable can be set to pass additional options to yamllint.
374
375
376 ===============================================================================
377 gitlablint                                                  *ale-yaml-gitlablint*
378
379 Website: https://github.com/elijah-roberts/gitlab-lint
380
381
382 -------------------------------------------------------------------------------
383 Installation
384
385 Install yamllint in your a virtualenv directory, locally, or globally: >
386
387   pip3 install gitlab_lint        # After activating virtualenv
388   pip3 install --user gitlab_lint # Install to ~/.local/bin
389   sudo pip3 install gitlab_lint   # Install globally
390
391 See |g:ale_virtualenv_dir_names| for configuring how ALE searches for
392 virtualenv directories.
393
394 Is recommended to use |g:ale_pattern_options| to enable this linter so it only
395 applies to 'gitlab-ci.yml' files and not all yaml files:
396 >
397   let g:ale_pattern_options = {
398   \   '.gitlab-ci\.yml$': {
399   \       'ale_linters': ['gitlablint'],
400   \   },
401   \}
402 <
403
404 -------------------------------------------------------------------------------
405 Options
406                                        *ale-options.yaml_gitlablint_executable*
407                                              *g:ale_yaml_gitlablint_executable*
408                                                *b:ale_yaml_gitlablint_executable*
409 yaml_gitlablint_executable
410 g:ale_yaml_gitlablint_executable
411   Type: |String|
412   Default: `'gll'`
413
414   This variable can be set to change the path to gll.
415
416                                           *ale-options.yaml_gitlablint_options*
417                                                 *g:ale_yaml_gitlablint_options*
418                                                   *b:ale_yaml_gitlablint_options*
419 yaml_gitlablint_options
420 g:ale_yaml_gitlablint_options
421   Type: |String|
422   Default: `''`
423
424   This variable can be set to pass additional options to gll.
425
426
427 ===============================================================================
428 yq                                                                  *ale-yaml-yq*
429
430 Website: https://github.com/mikefarah/yq
431
432
433 -------------------------------------------------------------------------------
434 Installation
435
436 Install yq: >
437
438   wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - | tar xz && mv ${BINARY} /usr/bin/yq
439
440
441 -------------------------------------------------------------------------------
442 Options
443                                                *ale-options.yaml_yq_executable*
444                                                      *g:ale_yaml_yq_executable*
445                                                        *b:ale_yaml_yq_executable*
446 yaml_yq_executable
447 g:ale_yaml_yq_executable
448   Type: |String|
449   Default: `'yq'`
450
451   This variable can be set to change the path to yq.
452
453                                                   *ale-options.yaml_yq_options*
454                                                         *g:ale_yaml_yq_options*
455                                                           *b:ale_yaml_yq_options*
456 yaml_yq_options
457 g:ale_yaml_yq_options
458   Type: |String|
459   Default: `''`
460
461   This variable can be set to pass additional options to yq.
462
463                                                   *ale-options.yaml_yq_filters*
464                                                         *g:ale_yaml_yq_filters*
465                                                           *b:ale_yaml_yq_filters*
466 yaml_yq_filters
467 g:ale_yaml_yq_filters
468   Type: |String|
469   Default: `'.'`
470
471   This option can be changed to pass additional filters to yq
472
473 ===============================================================================
474   vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: