mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-02-16 16:58:38 +01:00
don't stopAllLinters() for disabled error
Summary: if we don't care and don't expect it to break all other linters then continue Test Plan: ##arc lint --trace## on a commit with non-ascii characters, saw other linters continue Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley, cpiro Differential Revision: 1122
This commit is contained in:
parent
a8b4231244
commit
0f35d03d29
2 changed files with 11 additions and 2 deletions
|
@ -104,6 +104,11 @@ abstract class ArcanistLinter {
|
||||||
return ArcanistLintSeverity::SEVERITY_ERROR;
|
return ArcanistLintSeverity::SEVERITY_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isMessageEnabled($code) {
|
||||||
|
return ($this->getLintMessageSeverity($code) !==
|
||||||
|
ArcanistLintSeverity::SEVERITY_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
public function getLintMessageName($code) {
|
public function getLintMessageName($code) {
|
||||||
$map = $this->getLintNameMap();
|
$map = $this->getLintNameMap();
|
||||||
if (isset($map[$code])) {
|
if (isset($map[$code])) {
|
||||||
|
|
|
@ -101,7 +101,9 @@ class ArcanistTextLinter extends ArcanistLinter {
|
||||||
self::LINT_DOS_NEWLINE,
|
self::LINT_DOS_NEWLINE,
|
||||||
'You must use ONLY Unix linebreaks ("\n") in source code.',
|
'You must use ONLY Unix linebreaks ("\n") in source code.',
|
||||||
"\r");
|
"\r");
|
||||||
$this->stopAllLinters();
|
if ($this->isMessageEnabled(self::LINT_DOS_NEWLINE)) {
|
||||||
|
$this->stopAllLinters();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +172,9 @@ class ArcanistTextLinter extends ArcanistLinter {
|
||||||
$string);
|
$string);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->stopAllLinters();
|
if ($this->isMessageEnabled(self::LINT_BAD_CHARSET)) {
|
||||||
|
$this->stopAllLinters();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function lintTrailingWhitespace($path) {
|
protected function lintTrailingWhitespace($path) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue