Fix #1866 - Handle empty output from Perl
This commit is contained in:
parent
30d1b37a56
commit
9518ea9acc
2 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,10 @@ let s:begin_failed_skip_pattern = '\v' . join([
|
|||
\], '|')
|
||||
|
||||
function! ale_linters#perl#perl#Handle(buffer, lines) abort
|
||||
if empty(a:lines)
|
||||
return []
|
||||
endif
|
||||
|
||||
let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)'
|
||||
let l:output = []
|
||||
let l:basename = expand('#' . a:buffer . ':t')
|
||||
|
|
|
@ -7,6 +7,11 @@ After:
|
|||
call ale#test#RestoreDirectory()
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The Perl linter should handle empty output):
|
||||
call ale#test#SetFilename('bar.pl')
|
||||
|
||||
AssertEqual [], ale_linters#perl#perl#Handle(bufnr(''), [])
|
||||
|
||||
Execute(The Perl linter should ignore errors from other files):
|
||||
call ale#test#SetFilename('bar.pl')
|
||||
|
||||
|
|
Reference in a new issue