1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 08:42:40 +01:00

Reintroduce arc diff --advice

Summary:
Some users want be stopped even if there are lint advices.

NOTE: Deleted by D3364.

Test Plan:
On diff with lint advice:

  $ arc diff --preview # advice just printed
  $ arc diff --preview --advice # excuse required

Reviewers: epriestley

Reviewed By: epriestley

CC: akramer, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3982
This commit is contained in:
vrana 2012-11-19 13:20:44 -08:00
parent 22d8e7467b
commit 5ca0f691a1

View file

@ -130,6 +130,7 @@ EOTEXT
'less-context' => null, 'less-context' => null,
'apply-patches' => '--raw disables lint.', 'apply-patches' => '--raw disables lint.',
'never-apply-patches' => '--raw disables lint.', 'never-apply-patches' => '--raw disables lint.',
'advice' => '--raw disables lint.',
'lintall' => '--raw disables lint.', 'lintall' => '--raw disables lint.',
'create' => '--raw and --create both need stdin. '. 'create' => '--raw and --create both need stdin. '.
@ -149,6 +150,7 @@ EOTEXT
'less-context' => null, 'less-context' => null,
'apply-patches' => '--raw-command disables lint.', 'apply-patches' => '--raw-command disables lint.',
'never-apply-patches' => '--raw-command disables lint.', 'never-apply-patches' => '--raw-command disables lint.',
'advice' => '--raw-command disables lint.',
'lintall' => '--raw-command disables lint.', 'lintall' => '--raw-command disables lint.',
), ),
), ),
@ -174,6 +176,7 @@ EOTEXT
"Do not run lint.", "Do not run lint.",
'conflicts' => array( 'conflicts' => array(
'lintall' => '--nolint suppresses lint.', 'lintall' => '--nolint suppresses lint.',
'advice' => '--nolint suppresses lint.',
'apply-patches' => '--nolint suppresses lint.', 'apply-patches' => '--nolint suppresses lint.',
'never-apply-patches' => '--nolint suppresses lint.', 'never-apply-patches' => '--nolint suppresses lint.',
), ),
@ -187,6 +190,7 @@ EOTEXT
'message' => '--only does not affect revisions.', 'message' => '--only does not affect revisions.',
'edit' => '--only does not affect revisions.', 'edit' => '--only does not affect revisions.',
'lintall' => '--only suppresses lint.', 'lintall' => '--only suppresses lint.',
'advice' => '--only suppresses lint.',
'apply-patches' => '--only suppresses lint.', 'apply-patches' => '--only suppresses lint.',
'never-apply-patches' => '--only suppresses lint.', 'never-apply-patches' => '--only suppresses lint.',
), ),
@ -231,6 +235,11 @@ EOTEXT
'lint' => true, 'lint' => true,
), ),
), ),
'advice' => array(
'help' =>
"Require excuse for lint advice in addition to lint warnings and ".
"errors.",
),
'apply-patches' => array( 'apply-patches' => array(
'help' => 'help' =>
'Apply patches suggested by lint to the working copy without '. 'Apply patches suggested by lint to the working copy without '.
@ -1250,8 +1259,16 @@ EOTEXT
switch ($lint_result) { switch ($lint_result) {
case ArcanistLintWorkflow::RESULT_OKAY: case ArcanistLintWorkflow::RESULT_OKAY:
$this->console->writeOut( if ($this->getArgument('advice') &&
"<bg:green>** LINT OKAY **</bg> No lint problems.\n"); $lint_workflow->getUnresolvedMessages()) {
$this->getErrorExcuse(
'lint',
"Lint issued unresolved advice.",
'lint-excuses');
} else {
$this->console->writeOut(
"<bg:green>** LINT OKAY **</bg> No lint problems.\n");
}
break; break;
case ArcanistLintWorkflow::RESULT_WARNINGS: case ArcanistLintWorkflow::RESULT_WARNINGS:
$this->getErrorExcuse( $this->getErrorExcuse(