mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-02-02 09:58:23 +01:00
Fix custom severity rules not being applied
Summary: It seems that `severity.rules` does not override the default linter severities set by the `ArcanistLinter` itself. This seems incorrect and counter-intuitive. Test Plan: Created a `"severity.rules": { "(.*)": "disabled" }"` configuration and verified that it was being applied. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D10475
This commit is contained in:
parent
679c13b1b0
commit
75ad848b9d
1 changed files with 5 additions and 5 deletions
|
@ -192,17 +192,17 @@ abstract class ArcanistLinter {
|
|||
return $map[$code];
|
||||
}
|
||||
|
||||
$map = $this->getLintSeverityMap();
|
||||
if (isset($map[$code])) {
|
||||
return $map[$code];
|
||||
}
|
||||
|
||||
foreach ($this->customSeverityRules as $rule => $severity) {
|
||||
if (preg_match($rule, $code)) {
|
||||
return $severity;
|
||||
}
|
||||
}
|
||||
|
||||
$map = $this->getLintSeverityMap();
|
||||
if (isset($map[$code])) {
|
||||
return $map[$code];
|
||||
}
|
||||
|
||||
return $this->getDefaultMessageSeverity($code);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue