'less-context' => null,
'apply-patches' => '--raw disables lint.',
'never-apply-patches' => '--raw disables lint.',
+ 'advice' => '--raw disables lint.',
'lintall' => '--raw disables lint.',
'create' => '--raw and --create both need stdin. '.
'less-context' => null,
'apply-patches' => '--raw-command disables lint.',
'never-apply-patches' => '--raw-command disables lint.',
+ 'advice' => '--raw-command disables lint.',
'lintall' => '--raw-command disables lint.',
),
),
"Do not run lint.",
'conflicts' => array(
'lintall' => '--nolint suppresses lint.',
+ 'advice' => '--nolint suppresses lint.',
'apply-patches' => '--nolint suppresses lint.',
'never-apply-patches' => '--nolint suppresses lint.',
),
'message' => '--only does not affect revisions.',
'edit' => '--only does not affect revisions.',
'lintall' => '--only suppresses lint.',
+ 'advice' => '--only suppresses lint.',
'apply-patches' => '--only suppresses lint.',
'never-apply-patches' => '--only suppresses lint.',
),
'lint' => true,
),
),
+ 'advice' => array(
+ 'help' =>
+ "Require excuse for lint advice in addition to lint warnings and ".
+ "errors.",
+ ),
'apply-patches' => array(
'help' =>
'Apply patches suggested by lint to the working copy without '.
switch ($lint_result) {
case ArcanistLintWorkflow::RESULT_OKAY:
- $this->console->writeOut(
- "<bg:green>** LINT OKAY **</bg> No lint problems.\n");
+ if ($this->getArgument('advice') &&
+ $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;
case ArcanistLintWorkflow::RESULT_WARNINGS:
$this->getErrorExcuse(