mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Improve arc lint --output summary
Summary: This currently output like this: file_a: file_b: file_c: Warning on line 29: blah blah This isn't especially useful and can't be piped to other tools. Instead, emit output like: file_c:29:Warning: blah blah This is greppable / pipeable. Test Plan: Ran `arc lint --output summary`. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7788
This commit is contained in:
parent
8e177c4db8
commit
35c01eee7b
1 changed files with 2 additions and 4 deletions
|
@ -11,18 +11,16 @@ final class ArcanistLintSummaryRenderer extends ArcanistLintRenderer {
|
|||
$path = $result->getPath();
|
||||
|
||||
$text = array();
|
||||
$text[] = $path.":";
|
||||
foreach ($messages as $message) {
|
||||
$name = $message->getName();
|
||||
$severity = ArcanistLintSeverity::getStringForSeverity(
|
||||
$message->getSeverity());
|
||||
$line = $message->getLine();
|
||||
|
||||
$text[] = " {$severity} on line {$line}: {$name}";
|
||||
$text[] = "{$path}:{$line}:{$severity}: {$name}\n";
|
||||
}
|
||||
$text[] = null;
|
||||
|
||||
return implode("\n", $text);
|
||||
return implode("", $text);
|
||||
}
|
||||
|
||||
public function renderOkayResult() {
|
||||
|
|
Loading…
Reference in a new issue