'ArcanistLintJSONRenderer' => 'lint/renderer/ArcanistLintJSONRenderer.php',
'ArcanistLintLikeCompilerRenderer' => 'lint/renderer/ArcanistLintLikeCompilerRenderer.php',
'ArcanistLintMessage' => 'lint/ArcanistLintMessage.php',
+ 'ArcanistLintNoneRenderer' => 'lint/renderer/ArcanistLintNoneRenderer.php',
'ArcanistLintPatcher' => 'lint/ArcanistLintPatcher.php',
'ArcanistLintRenderer' => 'lint/renderer/ArcanistLintRenderer.php',
'ArcanistLintResult' => 'lint/ArcanistLintResult.php',
'ArcanistLintConsoleRenderer' => 'ArcanistLintRenderer',
'ArcanistLintJSONRenderer' => 'ArcanistLintRenderer',
'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer',
+ 'ArcanistLintNoneRenderer' => 'ArcanistLintRenderer',
'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer',
'ArcanistLintWorkflow' => 'ArcanistBaseWorkflow',
'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase',
}
public function getCacheVersion() {
- return 2;
+ $version = '2';
+ $path = xhpast_get_binary_path();
+ if (Filesystem::pathExists($path)) {
+ $version .= '-'.md5_file($path);
+ }
+ return $version;
}
protected function buildFutures(array $paths) {
--- /dev/null
+<?php
+
+/**
+ * @group lint
+ */
+final class ArcanistLintNoneRenderer extends ArcanistLintRenderer {
+
+ public function renderLintResult(ArcanistLintResult $result) {
+ return '';
+ }
+
+ public function renderOkayResult() {
+ return '';
+ }
+
+}
'help' =>
"With 'summary', show lint warnings in a more compact format. ".
"With 'json', show lint warnings in machine-readable JSON format. ".
+ "With 'none', show no lint warnings. ".
"With 'compiler', show lint warnings in suitable for your editor."
),
'only-new' => array(
case 'summary':
$renderer = new ArcanistLintSummaryRenderer();
break;
+ case 'none':
+ $prompt_patches = false;
+ $apply_patches = $this->getArgument('apply-patches');
+ $renderer = new ArcanistLintNoneRenderer();
+ break;
case 'compiler':
$renderer = new ArcanistLintLikeCompilerRenderer();
$prompt_patches = false;
}
if ($failed) {
+ if ($failed instanceof ArcanistNoEffectException) {
+ if ($renderer instanceof ArcanistLintNoneRenderer) {
+ return 0;
+ }
+ }
throw $failed;
}