mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Change severity of PEP8 errors to warnings
Summary: None of these are that serious that I would like to be informed about them on unmodified lines. Test Plan: Linted Python file with lots of PEP8 errors, now warnings. Reviewers: zeeg, epriestley Reviewed By: zeeg CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3884
This commit is contained in:
parent
66d204be81
commit
21530fa459
1 changed files with 4 additions and 8 deletions
|
@ -99,6 +99,9 @@ final class ArcanistPEP8Linter extends ArcanistLinter {
|
|||
foreach ($matches as $key => $match) {
|
||||
$matches[$key] = trim($match);
|
||||
}
|
||||
if (!$this->isMessageEnabled($matches[4])) {
|
||||
continue;
|
||||
}
|
||||
$message = new ArcanistLintMessage();
|
||||
$message->setPath($path);
|
||||
$message->setLine($matches[2]);
|
||||
|
@ -106,14 +109,7 @@ 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 {
|
||||
$message->setSeverity(ArcanistLintSeverity::SEVERITY_WARNING);
|
||||
}
|
||||
$message->setSeverity(ArcanistLintSeverity::SEVERITY_WARNING);
|
||||
$this->addLintMessage($message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue