From: Chris Piro Date: Thu, 27 Oct 2011 22:37:45 +0000 (-0700) Subject: support newer PyLint column numbers X-Git-Tag: conduit-4~254 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=c0007ffd44701272ddfc99b10eda77ead18fe8a9;p=arcanist.git 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 --- diff --git a/src/lint/linter/pylint/ArcanistPyLintLinter.php b/src/lint/linter/pylint/ArcanistPyLintLinter.php index 5f452345..51c48fdd 100644 --- a/src/lint/linter/pylint/ArcanistPyLintLinter.php +++ b/src/lint/linter/pylint/ArcanistPyLintLinter.php @@ -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) {