diff options
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/proto/protoc_gen_lint.vim | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ale_linters/proto/protoc_gen_lint.vim b/ale_linters/proto/protoc_gen_lint.vim index 9d5ceacc..c8b5c331 100644 --- a/ale_linters/proto/protoc_gen_lint.vim +++ b/ale_linters/proto/protoc_gen_lint.vim @@ -1,12 +1,20 @@ " Author: Jeff Willette <jrwillette88@gmail.com> " Description: run the protoc-gen-lint plugin for the protoc binary +call ale#Set('proto_protoc_gen_lint_options', '') + function! ale_linters#proto#protoc_gen_lint#GetCommand(buffer) abort let l:dirname = expand('#' . a:buffer . ':p:h') - return 'protoc' - \ . ' -I ' . ale#Escape(l:dirname) - \ . ' --lint_out=. ' . '%s' + let l:options = ['-I ' . ale#Escape(l:dirname)] + + if !empty(ale#Var(a:buffer, 'proto_protoc_gen_lint_options')) + let l:options += [ale#Var(a:buffer, 'proto_protoc_gen_lint_options')] + endif + + let l:options += ['--lint_out=. ' . '%s'] + + return 'protoc' . ' ' . join(l:options) endfunction call ale#linter#Define('proto', { |