1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-26 15:30:57 +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() {
return "\n";
return "";
}
}

View file

@ -185,14 +185,7 @@ EOTEXT
case 'json':
$renderer = new ArcanistLintJSONRenderer();
$prompt_patches = false;
$apply_patches = false;
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."
);
}
$apply_patches = $this->getArgument('apply-patches');
break;
case 'summary':
$renderer = new ArcanistLintSummaryRenderer();