install.fairie/dotfiles/.vim/plugged/ale/ale_linters/proto/protolint.vim
Git E2E Dev Test Username e149692cc9 git subrepo clone https://github.com/dense-analysis/ale.git ./dotfiles/.vim/plugged/ale
subrepo:
  subdir:   "dotfiles/.vim/plugged/ale"
  merged:   "e4b205440"
upstream:
  origin:   "https://github.com/dense-analysis/ale.git"
  branch:   "master"
  commit:   "e4b205440"
git-subrepo:
  version:  "0.4.3"
  origin:   "???"
  commit:   "???"
2022-10-18 10:37:09 -04:00

24 lines
783 B
VimL

" Author: Yohei Yoshimuta <yoheimuta@gmail.com>
" Description: run the protolint for Protocol Buffer files
call ale#Set('proto_protolint_executable', 'protolint')
call ale#Set('proto_protolint_config', '')
function! ale_linters#proto#protolint#GetCommand(buffer) abort
let l:config = ale#Var(a:buffer, 'proto_protolint_config')
return '%e lint'
\ . (!empty(l:config) ? ' -config_path=' . ale#Escape(l:config) : '')
\ . ' -reporter=unix'
\ . ' %s'
endfunction
call ale#linter#Define('proto', {
\ 'name': 'protolint',
\ 'lint_file': 1,
\ 'output_stream': 'stderr',
\ 'executable': {b -> ale#Var(b, 'proto_protolint_executable')},
\ 'command': function('ale_linters#proto#protolint#GetCommand'),
\ 'callback': 'ale#handlers#unix#HandleAsError',
\})