Commit Graph
3 Commits
Author SHA1 Message Date
Mark Grimes c19f2aa302 Adds tests for perl-linter where a second file/line is included in error 2018-12-19 08:30:23 -05:00
Mark Grimes ebab81b220 Use non-greedy matching instead of looking for the comma 2018-12-16 17:01:24 -05:00
Mark Grimes 38d25fc7c0 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.
2018-12-14 17:13:49 -05:00