Add support for V: "v" (compiler) and "vfmt" fixer. (#3622)

* v: add "v fmt" fixer.

* v: add "v" (build) linter.

* v: fix vlint complaints and add documentation.

* v: add tests.

* v: use ale#Pad().
This commit is contained in:
fiatjaf
2021-03-26 03:38:57 -03:00
committed by GitHub
parent b1f95dc4fb
commit 655f0070cd
12 changed files with 279 additions and 0 deletions

View File

@@ -534,6 +534,9 @@ Notes:
* `tslint`
* `tsserver`
* `typecheck`
* V
* `v`
* `vfmt`
* VALA
* `uncrustify`
* `vala_lint`!!

45
doc/ale-v.txt Normal file
View File

@@ -0,0 +1,45 @@
===============================================================================
ALE V Integration *ale-v-options*
===============================================================================
Integration Information
`v` is V's build tool. `vfmt` (called as `v fmt` from the same
executable that does the builds) is the autoformatter/fixer.
g:ale_v_v_executable *g:ale_v_v_executable*
*b:ale_v_v_executable*
Type: |String|
Default: `'v'`
The executable that will be run for the `v` linter and the `vfmt` fixer.
===============================================================================
v *ale-v-v*
g:ale_v_v_options *g:ale_v_v_options*
*b:ale_v_v_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the v linter.
They are injected directly after "v .".
===============================================================================
vfmt *ale-v-vfmt*
g:ale_v_vfmt_options *g:ale_v_vfmt_options*
*b:ale_v_vfmt_options*
Type: |String|
Default: `''`
This variable can be set to pass additional options to the vfmt fixer.
They are injected directly after "v fmt".
===============================================================================
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:

View File

@@ -1593,6 +1593,7 @@ g:ale_linters *g:ale_linters*
\ 'text': [],
\ 'vue': ['eslint', 'vls'],
\ 'zsh': ['shell'],
\ 'v': ['v'],
\}
<
This option can be used to enable only a particular set of linters for a
@@ -3051,6 +3052,9 @@ documented in additional help files.
tslint................................|ale-typescript-tslint|
tsserver..............................|ale-typescript-tsserver|
xo....................................|ale-typescript-xo|
v.......................................|ale-v-options|
v.....................................|ale-v-v|
vfmt..................................|ale-v-vfmt|
vala....................................|ale-vala-options|
uncrustify............................|ale-vala-uncrustify|
verilog/systemverilog...................|ale-verilog-options|