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

[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
This commit is contained in:
Nick Harper 2012-03-08 21:22:36 -08:00
parent f57199268f
commit e462f2e84e

View file

@ -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 {