summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorGuangqing Chen <hi@goushi.me>2022-09-08 16:04:17 +0800
committerGitHub <noreply@github.com>2022-09-08 17:04:17 +0900
commit477ad3fdd2df80a9dc479f974caeca1aa6ae640b (patch)
treeb35534cf63ef1765d51b64e28ad37223c8ce440a /ale_linters
parente99f262c2f2c75e686d0eae1b3749a546e6d7f00 (diff)
downloadale-477ad3fdd2df80a9dc479f974caeca1aa6ae640b.zip
Allow to pass options to the buf linter and fix callback. (#4300)
* Allow to pass options to the buf linter * Fix the callback of buf linter
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/proto/buf_lint.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/ale_linters/proto/buf_lint.vim b/ale_linters/proto/buf_lint.vim
index e68494a7..a22f8e53 100644
--- a/ale_linters/proto/buf_lint.vim
+++ b/ale_linters/proto/buf_lint.vim
@@ -3,12 +3,15 @@
call ale#Set('proto_buf_lint_executable', 'buf')
call ale#Set('proto_buf_lint_config', '')
+call ale#Set('proto_buf_lint_options', '')
function! ale_linters#proto#buf_lint#GetCommand(buffer) abort
let l:config = ale#Var(a:buffer, 'proto_buf_lint_config')
+ let l:options = ale#Var(a:buffer, 'proto_buf_lint_options')
return '%e lint'
\ . (!empty(l:config) ? ' --config=' . ale#Escape(l:config) : '')
+ \ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' %s#include_package_files=true'
endfunction
@@ -19,5 +22,5 @@ call ale#linter#Define('proto', {
\ 'output_stream': 'stdout',
\ 'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')},
\ 'command': function('ale_linters#proto#buf_lint#GetCommand'),
-\ 'callback': 'ale#handlers#unix#HandleAsError',
+\ 'callback': 'ale#handlers#go#Handler',
\})