From 38d25fc7c04c19724f6be53b4c2de530dd55d671 Mon Sep 17 00:00:00 2001 From: Mark Grimes Date: Fri, 14 Dec 2018 16:14:54 -0500 Subject: 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 line ". 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, line 1. /Users/mgrimes/t.pl had compilation errors. ``` I am not 100% sure why `perl -c` generates errors with the extra "file line ". It only happens in some versions of perl when certain modules are used. --- ale_linters/perl/perl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ale_linters/perl/perl.vim') 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') -- cgit v1.2.3