'ArcanistLiberateLintEngine' => 'lint/engine/ArcanistLiberateLintEngine.php',
'ArcanistLiberateWorkflow' => 'workflow/ArcanistLiberateWorkflow.php',
'ArcanistLicenseLinter' => 'lint/linter/ArcanistLicenseLinter.php',
+ 'ArcanistLintConsoleRenderer' => 'lint/renderer/ArcanistLintConsoleRenderer.php',
'ArcanistLintEngine' => 'lint/engine/ArcanistLintEngine.php',
- 'ArcanistLintJSONRenderer' => 'lint/ArcanistLintJSONRenderer.php',
- 'ArcanistLintLikeCompilerRenderer' => 'lint/ArcanistLintLikeCompilerRenderer.php',
+ 'ArcanistLintJSONRenderer' => 'lint/renderer/ArcanistLintJSONRenderer.php',
+ 'ArcanistLintLikeCompilerRenderer' => 'lint/renderer/ArcanistLintLikeCompilerRenderer.php',
'ArcanistLintMessage' => 'lint/ArcanistLintMessage.php',
'ArcanistLintPatcher' => 'lint/ArcanistLintPatcher.php',
- 'ArcanistLintRenderer' => 'lint/ArcanistLintRenderer.php',
+ 'ArcanistLintRenderer' => 'lint/renderer/ArcanistLintRenderer.php',
'ArcanistLintResult' => 'lint/ArcanistLintResult.php',
'ArcanistLintSeverity' => 'lint/ArcanistLintSeverity.php',
- 'ArcanistLintSummaryRenderer' => 'lint/ArcanistLintSummaryRenderer.php',
+ 'ArcanistLintSummaryRenderer' => 'lint/renderer/ArcanistLintSummaryRenderer.php',
'ArcanistLintWorkflow' => 'workflow/ArcanistLintWorkflow.php',
'ArcanistLinter' => 'lint/linter/ArcanistLinter.php',
'ArcanistLinterTestCase' => 'lint/linter/__tests__/ArcanistLinterTestCase.php',
'ArcanistLiberateLintEngine' => 'ArcanistLintEngine',
'ArcanistLiberateWorkflow' => 'ArcanistBaseWorkflow',
'ArcanistLicenseLinter' => 'ArcanistLinter',
+ 'ArcanistLintConsoleRenderer' => 'ArcanistLintRenderer',
+ 'ArcanistLintJSONRenderer' => 'ArcanistLintRenderer',
+ 'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer',
+ 'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer',
'ArcanistLintWorkflow' => 'ArcanistBaseWorkflow',
'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
'ArcanistListWorkflow' => 'ArcanistBaseWorkflow',
--- /dev/null
+<?php
+
+/*
+ * Copyright 2012 Facebook, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Shows lint messages to the user.
+ *
+ * @group lint
+ */
+interface ArcanistLintRenderer {
+ public function renderLintResult(ArcanistLintResult $result);
+ public function renderOkayResult();
+}
return 0;
}
- $renderer = new ArcanistLintRenderer();
$failures = array();
foreach ($results as $result) {
if (!$result->getMessages()) {
"lint checks for this commit, or '{$at}nolint' to the file with ".
"errors to disable lint for that file.\n\n");
echo phutil_console_wrap($msg);
+
+ $renderer = new ArcanistLintConsoleRenderer();
foreach ($failures as $result) {
echo $renderer->renderLintResult($result);
}