return array(
'lintall' => array(
'help' =>
- "Show all lint warnings, not just those on changed lines."
+ "Show all lint warnings, not just those on changed lines. When " .
+ "paths are specified, this is the default behavior.",
+ 'conflicts' => array(
+ 'only-changed' => true,
+ ),
+ ),
+ 'only-changed' => array(
+ 'help' =>
+ "Show lint warnings just on changed lines. When no paths are " .
+ "specified, this is the default. This differs from only-new " .
+ "in cases where line modifications introduce lint on other " .
+ "unmodified lines.",
+ 'conflicts' => array(
+ 'lintall' => true,
+ ),
),
'rev' => array(
'param' => 'revision',
throw new ArcanistUsageException("Specify either --rev or paths.");
}
- $this->shouldLintAll = $this->getArgument('lintall');
- if ($paths) {
- // NOTE: When the user specifies paths, we imply --lintall and show all
- // warnings for the paths in question. This is easier to deal with for
- // us and less confusing for users.
+
+ // NOTE: When the user specifies paths, we imply --lintall and show all
+ // warnings for the paths in question. This is easier to deal with for
+ // us and less confusing for users.
+ $this->shouldLintAll = $paths ? true : false;
+ if ($this->getArgument('lintall')) {
$this->shouldLintAll = true;
+ } else if ($this->getArgument('only-changed')) {
+ $this->shouldLintAll = false;
}
if ($everything) {