diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 546cdac8..9cf2a511 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -84,6 +84,7 @@ phutil_register_library_map(array( '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', @@ -225,6 +226,7 @@ phutil_register_library_map(array( 'ArcanistLintConsoleRenderer' => 'ArcanistLintRenderer', 'ArcanistLintJSONRenderer' => 'ArcanistLintRenderer', 'ArcanistLintLikeCompilerRenderer' => 'ArcanistLintRenderer', + 'ArcanistLintNoneRenderer' => 'ArcanistLintRenderer', 'ArcanistLintSummaryRenderer' => 'ArcanistLintRenderer', 'ArcanistLintWorkflow' => 'ArcanistBaseWorkflow', 'ArcanistLinterTestCase' => 'ArcanistPhutilTestCase', diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php index 4ae868e1..842e2b35 100644 --- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php +++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php @@ -65,7 +65,12 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { } 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) { diff --git a/src/lint/renderer/ArcanistLintNoneRenderer.php b/src/lint/renderer/ArcanistLintNoneRenderer.php new file mode 100644 index 00000000..da44ac86 --- /dev/null +++ b/src/lint/renderer/ArcanistLintNoneRenderer.php @@ -0,0 +1,16 @@ + "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( @@ -384,6 +385,11 @@ EOTEXT 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; @@ -480,6 +486,11 @@ EOTEXT } if ($failed) { + if ($failed instanceof ArcanistNoEffectException) { + if ($renderer instanceof ArcanistLintNoneRenderer) { + return 0; + } + } throw $failed; }