From e462f2e84ec75d0ab279953cc307c8897928df88 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Thu, 8 Mar 2012 21:22:36 -0800 Subject: [PATCH] [arcanist] respect severity disabled in PEP8 linter Summary: This allows for disabling certain PEP8 linter errors by calling setCustomSeverityMap on an ArcanistPEP8Linter. However, any custom severities besides disabled will be ignored. Test Plan: arc lint Reviewers: epriestley, andrewjcg Reviewed By: epriestley CC: jungejason, aran, epriestley Differential Revision: https://secure.phabricator.com/D1839 --- src/lint/linter/pep8/ArcanistPEP8Linter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lint/linter/pep8/ArcanistPEP8Linter.php b/src/lint/linter/pep8/ArcanistPEP8Linter.php index 9e5aa6b2..b9778de4 100644 --- a/src/lint/linter/pep8/ArcanistPEP8Linter.php +++ b/src/lint/linter/pep8/ArcanistPEP8Linter.php @@ -122,6 +122,9 @@ final class ArcanistPEP8Linter extends ArcanistLinter { $message->setCode($matches[4]); $message->setName('PEP8 '.$matches[4]); $message->setDescription($matches[5]); + if (!$this->isMessageEnabled($matches[4])) { + continue; + } if ($matches[4][0] == 'E') { $message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR); } else {