1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Set path on more linters

Summary:
This is in a similar vein as D14220 and sets a name on linter
messages. This should handle issues from D14165.

Test Plan: Run as many of the changed linters as possible + existing linter tests.

Reviewers: chad, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14225
This commit is contained in:
Vihang Mehta 2015-10-02 08:58:15 -07:00 committed by epriestley
parent f0c57986bc
commit 1b4a3e0c5e
5 changed files with 5 additions and 0 deletions

View file

@ -72,6 +72,7 @@ final class ArcanistCSSLintLinter extends ArcanistExternalLinter {
->setLine($child->getAttribute('line'))
->setChar($child->getAttribute('char'))
->setCode($this->getLinterName())
->setName($this->getLinterName())
->setDescription($child->getAttribute('reason'))
->setOriginalText(
substr(

View file

@ -53,6 +53,7 @@ final class ArcanistGoLintLinter extends ArcanistExternalLinter {
$message->setLine($matches[1]);
$message->setChar($matches[2]);
$message->setCode($this->getLinterName());
$message->setName($this->getLinterName());
$message->setDescription(ucfirst(trim($matches[3])));
$message->setSeverity(ArcanistLintSeverity::SEVERITY_ADVICE);

View file

@ -72,6 +72,7 @@ final class ArcanistJSONLintLinter extends ArcanistExternalLinter {
$message->setLine($matches['line']);
$message->setChar($matches['column']);
$message->setCode($this->getLinterName());
$message->setName($this->getLinterName());
$message->setDescription(ucfirst($matches['description']));
$message->setSeverity(ArcanistLintSeverity::SEVERITY_ERROR);

View file

@ -109,6 +109,7 @@ final class ArcanistJscsLinter extends ArcanistExternalLinter {
$message->setLine($error->getAttribute('line'));
$message->setChar($error->getAttribute('column'));
$message->setCode('JSCS');
$message->setName('JSCS');
$message->setDescription($error->getAttribute('message'));
switch ($error->getAttribute('severity')) {

View file

@ -71,6 +71,7 @@ final class ArcanistPyFlakesLinter extends ArcanistExternalLinter {
$message->setPath($path);
$message->setLine($matches[2]);
$message->setCode($this->getLinterName());
$message->setName($this->getLinterName());
$message->setDescription($description);
$message->setSeverity($severity);