1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-01 19:22:41 +01:00

Allow arc lint --output json --apply-patches

Summary:
I want to use JSON which allows me to automatically open the files in editor.
I also want to apply patches, especially those modifying __init__.php.
I see no reason why these options should be mutually exclusive.

Also output nothing for okay result which is more standard and better parsable.

Test Plan:
arc lint --output json
arc lint --output json --never-apply-patches # same as above
arc lint --output json --apply-patches

Reviewers: aran, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1599
This commit is contained in:
vrana 2012-02-10 21:35:12 -08:00
parent 8cb5292edf
commit e8ca66ead4
2 changed files with 2 additions and 9 deletions

View file

@ -52,6 +52,6 @@ final class ArcanistLintJSONRenderer {
} }
public function renderOkayResult() { public function renderOkayResult() {
return "\n"; return "";
} }
} }

View file

@ -185,14 +185,7 @@ EOTEXT
case 'json': case 'json':
$renderer = new ArcanistLintJSONRenderer(); $renderer = new ArcanistLintJSONRenderer();
$prompt_patches = false; $prompt_patches = false;
$apply_patches = false; $apply_patches = $this->getArgument('apply-patches');
if ($this->getArgument('never-apply-patches') ||
$this->getArgument('apply-patches')) {
throw new ArcanistUsageException(
"Automatic patch suggestion is disabled when using JSON output. ".
"Remove --never-apply-patches or --apply-patches."
);
}
break; break;
case 'summary': case 'summary':
$renderer = new ArcanistLintSummaryRenderer(); $renderer = new ArcanistLintSummaryRenderer();