Update the perl-linter's l:pattern to catch missing errors
In some situations, errors reported by `perl -c` can have multiple listings of "at <file> line <number>". If the l:pattern is changed to use non-greedy matching it will also match these. For example: ``` use strict; use DateTime; $asdf=1; ``` Results in: ``` Global symbol "$asdf" requires explicit package name (did you forget to declare "my $asdf"?) at /Users/mgrimes/t.pl line 3, <DATA> line 1. /Users/mgrimes/t.pl had compilation errors. ``` I am not 100% sure why `perl -c` generates errors with the extra "file line <num>". It only happens in some versions of perl when certain modules are used.
This commit is contained in:
parent
2cfa09e02d
commit
38d25fc7c0
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ function! ale_linters#perl#perl#Handle(buffer, lines) abort
|
|||
return []
|
||||
endif
|
||||
|
||||
let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\)'
|
||||
let l:pattern = '\(.\+\) at \(.\+\) line \(\d\+\),'
|
||||
let l:output = []
|
||||
let l:basename = expand('#' . a:buffer . ':t')
|
||||
|
||||
|
|
Reference in a new issue