ale/ale_linters/yaml/spectral.vim

15 lines
545 B
VimL
Raw Normal View History

2020-12-13 08:06:23 +00:00
" Author: t2h5 <https://github.com/t2h5>
" Description: Integration of Stoplight Spectral CLI with ALE.
call ale#Set('yaml_spectral_executable', 'spectral')
call ale#Set('yaml_spectral_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#linter#Define('yaml', {
\ 'name': 'spectral',
\ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_spectral', [
2020-12-13 08:06:23 +00:00
\ 'node_modules/.bin/spectral',
\ ])},
\ 'command': '%e lint --ignore-unknown-format -q -f text %t',
2021-01-06 04:22:08 +00:00
\ 'callback': 'ale#handlers#spectral#HandleSpectralOutput'
2020-12-13 08:06:23 +00:00
\})