Changeset View
Changeset View
Standalone View
Standalone View
src/lint/renderer/ArcanistLintConsoleRenderer.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Shows lint messages to the user. | * Shows lint messages to the user. | ||||
| * | |||||
| * @group lint | |||||
| */ | */ | ||||
| final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer { | final class ArcanistLintConsoleRenderer extends ArcanistLintRenderer { | ||||
| private $showAutofixPatches = false; | private $showAutofixPatches = false; | ||||
| public function setShowAutofixPatches($show_autofix_patches) { | public function setShowAutofixPatches($show_autofix_patches) { | ||||
| $this->showAutofixPatches = $show_autofix_patches; | $this->showAutofixPatches = $show_autofix_patches; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function renderLintResult(ArcanistLintResult $result) { | public function renderLintResult(ArcanistLintResult $result) { | ||||
| ▲ Show 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | return sprintf( | ||||
| ' %3s %1s %6s %s', | ' %3s %1s %6s %s', | ||||
| $chevron, | $chevron, | ||||
| $diff, | $diff, | ||||
| $line, | $line, | ||||
| $data); | $data); | ||||
| } | } | ||||
| public function renderOkayResult() { | public function renderOkayResult() { | ||||
| return | return phutil_console_format( | ||||
| phutil_console_format("<bg:green>** OKAY **</bg> No lint warnings.\n"); | "<bg:green>** OKAY **</bg> No lint warnings.\n"); | ||||
| } | } | ||||
| } | } | ||||