mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-04-09 19:08:39 +02: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:
parent
f57199268f
commit
e462f2e84e
1 changed files with 3 additions and 0 deletions
|
@ -122,6 +122,9 @@ final class ArcanistPEP8Linter extends ArcanistLinter {
|
||||||
$message->setCode($matches[4]);
|
$message->setCode($matches[4]);
|
||||||
$message->setName('PEP8 '.$matches[4]);
|
$message->setName('PEP8 '.$matches[4]);
|
||||||
$message->setDescription($matches[5]);
|
$message->setDescription($matches[5]);
|
||||||
|
if (!$this->isMessageEnabled($matches[4])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if ($matches[4][0] == 'E') {
|
if ($matches[4][0] == 'E') {
|
||||||
$message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR);
|
$message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue