#681 Show extra kotlin errors at line 1

This commit is contained in:
w0rp 2017-06-24 12:35:01 +01:00
parent 1ea61162a0
commit 026c4f304e
2 changed files with 3 additions and 3 deletions

View File

@ -136,7 +136,7 @@ function! ale_linters#kotlin#kotlinc#Handle(buffer, lines) abort
let l:type_marker_str = l:type ==# 'warning' || l:type ==# 'info' ? 'W' : 'E' let l:type_marker_str = l:type ==# 'warning' || l:type ==# 'info' ? 'W' : 'E'
call add(l:output, { call add(l:output, {
\ 'lnum': -1, \ 'lnum': 1,
\ 'text': l:text, \ 'text': l:text,
\ 'type': l:type_marker_str, \ 'type': l:type_marker_str,
\}) \})

View File

@ -328,8 +328,8 @@ function! ale#engine#FixLocList(buffer, linter_name, loclist) abort
let l:item.sub_type = l:old_item.sub_type let l:item.sub_type = l:old_item.sub_type
endif endif
if l:item.lnum == 0 if l:item.lnum < 1
" When errors appear at line 0, put them at line 1 instead. " When errors appear before line 1, put them at line 1.
let l:item.lnum = 1 let l:item.lnum = 1
elseif l:item.lnum > l:last_line_number elseif l:item.lnum > l:last_line_number
" When errors go beyond the end of the file, put them at the end. " When errors go beyond the end of the file, put them at the end.