diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-24 21:11:27 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-24 21:11:33 +0100 |
commit | 99afe586b3a42adce580011079a83bbdaab675bd (patch) | |
tree | 348bed5d0b5e38ca8e908015d7e1b40167dd5184 /autoload | |
parent | 689921d7e3dd562383026c014d69d1ef011deeb9 (diff) | |
download | ale-99afe586b3a42adce580011079a83bbdaab675bd.zip |
Simplify some code and format some tests better
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/handlers.vim | 21 | ||||
-rw-r--r-- | autoload/ale/handlers/rust.vim | 6 |
2 files changed, 0 insertions, 27 deletions
diff --git a/autoload/ale/handlers.vim b/autoload/ale/handlers.vim index 75d881fa..011817ab 100644 --- a/autoload/ale/handlers.vim +++ b/autoload/ale/handlers.vim @@ -22,15 +22,11 @@ function! s:HandleUnixFormat(buffer, lines, type) 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[3], \ 'type': a:type, - \ 'nr': -1, \}) endfor @@ -60,13 +56,10 @@ function! ale#handlers#HandleCppCheckFormat(buffer, lines) abort endif call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:match[1] + 0, - \ 'vcol': 0, \ 'col': 0, \ 'text': l:match[3] . ' (' . l:match[2] . ')', \ 'type': l:match[2] ==# 'error' ? 'E' : 'W', - \ 'nr': -1, \}) endfor @@ -103,13 +96,10 @@ function! ale#handlers#HandlePEP8Format(buffer, lines) abort endif call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:match[1] + 0, - \ 'vcol': 0, \ 'col': l:match[2] + 0, \ 'text': l:code . ': ' . l:match[5], \ 'type': l:match[4] ==# 'E' ? 'E' : 'W', - \ 'nr': -1, \}) endfor @@ -142,15 +132,11 @@ function! ale#handlers#HandleCSSLintFormat(buffer, lines) abort " it is on small echo lines. let l:text = '(' . l:errorGroup . ') ' . l:text - " 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:text, \ 'type': l:type ==# 'Warning' ? 'W' : 'E', - \ 'nr': -1, \}) endfor @@ -176,15 +162,11 @@ function! ale#handlers#HandleStyleLintFormat(buffer, lines) abort let l:type = l:match[3] ==# '✖' ? 'E' : 'W' let l:text = l:match[4] . '[' . l:match[5] . ']' - " 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:text, \ 'type': l:type, - \ 'nr': -1, \}) endfor @@ -233,13 +215,10 @@ function! ale#handlers#HandleGhcFormat(buffer, lines) abort let l:type = l:type ==# '' ? 'E' : toupper(l:type[0]) call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:match[1] + 0, - \ 'vcol': 0, \ 'col': l:match[2] + 0, \ 'text': l:text, \ 'type': l:type, - \ 'nr': -1, \}) endfor diff --git a/autoload/ale/handlers/rust.vim b/autoload/ale/handlers/rust.vim index c00c2276..4fa7f059 100644 --- a/autoload/ale/handlers/rust.vim +++ b/autoload/ale/handlers/rust.vim @@ -53,11 +53,8 @@ function! ale#handlers#rust#HandleRustErrorsForFile(buffer, full_filename, lines \ && (l:span_filename ==# l:filename || l:span_filename ==# '<anon>') \) call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:span.line_start, - \ 'vcol': 0, \ 'col': l:span.byte_start, - \ 'nr': -1, \ 'text': l:error.message, \ 'type': toupper(l:error.level[0]), \}) @@ -68,11 +65,8 @@ function! ale#handlers#rust#HandleRustErrorsForFile(buffer, full_filename, lines if !empty(l:root_cause) call add(l:output, { - \ 'bufnr': a:buffer, \ 'lnum': l:root_cause[0], - \ 'vcol': 0, \ 'col': l:root_cause[1], - \ 'nr': -1, \ 'text': l:error.message, \ 'type': toupper(l:error.level[0]), \}) |