Simplify some code and format some tests better

This commit is contained in:
w0rp
2017-04-24 21:11:27 +01:00
parent 689921d7e3
commit 99afe586b3
8 changed files with 195 additions and 245 deletions

View File

@@ -18,7 +18,6 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
let l:text = l:match[3]
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:lnum,
\ 'col': 0,
\ 'type': l:type,

View File

@@ -50,15 +50,11 @@ function! ale_linters#go#gobuild#HandleGoBuildErrors(buffer, full_filename, line
continue
endif
" vcol is Needed to indicate that the column is a character.
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0,
\ 'vcol': 0,
\ 'col': l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': 'E',
\ 'nr': -1,
\})
endfor

View File

@@ -32,15 +32,11 @@ function! ale_linters#go#gometalinter#Handler(buffer, lines) abort
continue
endif
" vcol is Needed to indicate that the column is a character.
call add(l:output, {
\ 'bufnr': a:buffer,
\ 'lnum': l:match[1] + 0,
\ 'vcol': 0,
\ 'col': l:match[2] + 0,
\ 'text': l:match[4],
\ 'type': tolower(l:match[3]) ==# 'warning' ? 'W' : 'E',
\ 'nr': -1,
\})
endfor