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
}
public function renderOkayResult() {
- return "\n";
+ return "";
}
}
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();