mirror of
https://github.com/amix/vimrc
synced 2025-07-09 10:45:00 +08:00
Use sources_non_forked folder for pathogen path, with sources_non_forked_fallback folder as fallback.
This commit is contained in:
@ -1,26 +0,0 @@
|
||||
" Author: Alex McKinney <alexmckinney01@gmail.com>
|
||||
" Description: Run buf lint.
|
||||
|
||||
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
|
||||
|
||||
call ale#linter#Define('proto', {
|
||||
\ 'name': 'buf_lint',
|
||||
\ 'aliases': ['buf-lint'],
|
||||
\ 'lint_file': 1,
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable': {b -> ale#Var(b, 'proto_buf_lint_executable')},
|
||||
\ 'command': function('ale_linters#proto#buf_lint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#go#Handler',
|
||||
\})
|
@ -1,27 +0,0 @@
|
||||
" 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')
|
||||
|
||||
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', {
|
||||
\ 'name': 'protoc-gen-lint',
|
||||
\ 'lint_file': 1,
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': 'protoc',
|
||||
\ 'command': function('ale_linters#proto#protoc_gen_lint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||
\})
|
@ -1,24 +0,0 @@
|
||||
" 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',
|
||||
\})
|
||||
|
Reference in New Issue
Block a user