1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

support newer PyLint column numbers

Summary: newer PyLint includes commas and a column number for every message
after the line number. ignore that if it's present.

Test Plan: ##arc lint --trace --lintall## a file with messages with the old and
new pylint (2.5), works fine with both

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: 1062
This commit is contained in:
Chris Piro 2011-10-27 15:37:45 -07:00
parent b2cd182527
commit c0007ffd44

View file

@ -238,7 +238,9 @@ class ArcanistPyLintLinter extends ArcanistLinter {
$messages = array();
foreach ($lines as $line) {
$matches = null;
if (!preg_match('/([A-Z]\d+): *(\d+): *(.*)$/', $line, $matches)) {
if (!preg_match(
'/([A-Z]\d+): *(\d+)(?:|,\d*): *(.*)$/',
$line, $matches)) {
continue;
}
foreach ($matches as $key => $match) {