From c0007ffd44701272ddfc99b10eda77ead18fe8a9 Mon Sep 17 00:00:00 2001 From: Chris Piro Date: Thu, 27 Oct 2011 15:37:45 -0700 Subject: [PATCH] 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 --- src/lint/linter/pylint/ArcanistPyLintLinter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.43.0