summaryrefslogtreecommitdiff
path: root/ale_linters/perl/perl.vim
diff options
context:
space:
mode:
authorMark Grimes <mgrimes@cpan.org>2018-12-14 16:14:54 -0500
committerMark Grimes <mgrimes@cpan.org>2018-12-14 17:13:49 -0500
commit38d25fc7c04c19724f6be53b4c2de530dd55d671 (patch)
treea1eba3aba2ec7df10c235a2d815c0c4612fb2bfb /ale_linters/perl/perl.vim
parent2cfa09e02d65cd06649fb1ae5f988b7a110a124d (diff)
downloadale-38d25fc7c04c19724f6be53b4c2de530dd55d671.zip
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.
Diffstat (limited to 'ale_linters/perl/perl.vim')
-rw-r--r--ale_linters/perl/perl.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/ale_linters/perl/perl.vim b/ale_linters/perl/perl.vim
index 1cb20fa7..131e7152 100644
--- a/ale_linters/perl/perl.vim
+++ b/ale_linters/perl/perl.vim
@@ -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')