mirror of
https://github.com/amix/vimrc
synced 2025-08-15 19:55:01 +08:00
Updated plugins
This commit is contained in:
@ -132,7 +132,9 @@ function! ale_linters#java#javac#Handle(buffer, lines) abort
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, [l:pattern, l:col_pattern, l:symbol_pattern])
|
||||
if empty(l:match[2]) && empty(l:match[3])
|
||||
let l:output[-1].col = len(l:match[1])
|
||||
if !empty(l:match[1]) && !empty(l:output)
|
||||
let l:output[-1].col = len(l:match[1])
|
||||
endif
|
||||
elseif empty(l:match[3])
|
||||
" Add symbols to 'cannot find symbol' errors.
|
||||
if l:output[-1].text is# 'error: cannot find symbol'
|
||||
|
35
sources_non_forked/ale/ale_linters/yaml/circleci.vim
Normal file
35
sources_non_forked/ale/ale_linters/yaml/circleci.vim
Normal file
@ -0,0 +1,35 @@
|
||||
function! ale_linters#yaml#circleci#Handle(buffer, lines) abort
|
||||
let l:match_index = -1
|
||||
let l:output = []
|
||||
|
||||
for l:index in range(len(a:lines))
|
||||
let l:line = a:lines[l:index]
|
||||
|
||||
if l:line =~? 'Error: ERROR IN CONFIG FILE:'
|
||||
let l:match_index = l:index + 1
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
if l:match_index > 0
|
||||
return [{
|
||||
\ 'type': 'E',
|
||||
\ 'lnum': 1,
|
||||
\ 'text': a:lines[l:match_index],
|
||||
\ 'detail': join(a:lines[l:match_index :], "\n"),
|
||||
\}]
|
||||
endif
|
||||
|
||||
return []
|
||||
endfunction
|
||||
|
||||
" The circleci validate requires network requests, so we'll only run it when
|
||||
" files are saved to prevent the server from being hammered.
|
||||
call ale#linter#Define('yaml', {
|
||||
\ 'name': 'circleci',
|
||||
\ 'executable': {b -> expand('#' . b . ':p') =~? '\.circleci' ? 'circleci' : ''},
|
||||
\ 'command': 'circleci config validate - < %s',
|
||||
\ 'callback': 'ale_linters#yaml#circleci#Handle',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
Reference in New Issue
Block a user