mirror of
https://github.com/amix/vimrc
synced 2025-08-30 02:44:59 +08:00
Updated plugins
This commit is contained in:
@ -16,7 +16,7 @@ endfunction
|
||||
function! ale_linters#clojure#clj_kondo#HandleCljKondoFormat(buffer, lines) abort
|
||||
" output format
|
||||
" <filename>:<line>:<column>: <issue type>: <message>
|
||||
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):(\d+):? ((Exception|error|warning): ?(.+))$'
|
||||
let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+)?:(\d+)?:? ((Exception|error|warning): ?(.+))$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
|
@ -55,13 +55,19 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
|
||||
let l:detail = 'hadolint could not parse the file because of a syntax error.'
|
||||
endif
|
||||
|
||||
call add(l:output, {
|
||||
let l:line_output = {
|
||||
\ 'lnum': l:lnum,
|
||||
\ 'col': l:colnum,
|
||||
\ 'type': l:type,
|
||||
\ 'text': l:text,
|
||||
\ 'detail': l:detail
|
||||
\})
|
||||
\}
|
||||
|
||||
if l:code isnot# ''
|
||||
let l:line_output['code'] = l:code
|
||||
endif
|
||||
|
||||
call add(l:output, l:line_output)
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
|
@ -6,7 +6,7 @@ call ale#Set('ruby_ruby_executable', 'ruby')
|
||||
call ale#linter#Define('ruby', {
|
||||
\ 'name': 'ruby',
|
||||
\ 'executable': {b -> ale#Var(b, 'ruby_ruby_executable')},
|
||||
\ 'command': '%e -w -c -T1 %t',
|
||||
\ 'command': '%e -w -c %t',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'callback': 'ale#handlers#ruby#HandleSyntaxErrors',
|
||||
\})
|
||||
|
22
sources_non_forked/ale/ale_linters/zeek/zeek.vim
Normal file
22
sources_non_forked/ale/ale_linters/zeek/zeek.vim
Normal file
@ -0,0 +1,22 @@
|
||||
" Author: Benjamin Bannier <bbannier@gmail.com>
|
||||
" Description: Support for checking Zeek files.
|
||||
"
|
||||
call ale#Set('zeek_zeek_executable', 'zeek')
|
||||
|
||||
function! ale_linters#zeek#zeek#HandleErrors(buffer, lines) abort
|
||||
let l:pattern = 'error in \v.*, line (\d+): (.*)$'
|
||||
|
||||
return map(ale#util#GetMatches(a:lines, l:pattern), "{
|
||||
\ 'lnum': str2nr(v:val[1]),
|
||||
\ 'text': v:val[2],
|
||||
\}")
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('zeek', {
|
||||
\ 'name': 'zeek',
|
||||
\ 'executable': {b -> ale#Var(b, 'zeek_zeek_executable')},
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'command': {-> '%e --parse-only %s'},
|
||||
\ 'callback': 'ale_linters#zeek#zeek#HandleErrors',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
Reference in New Issue
Block a user