mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 08:42:40 +01:00
Clarify what "--everything" means in "arc lint" and "arc unit"
Summary: Fixes T13061. Both `arc lint` and `arc unit` accept an `--everything` flag, but the documentation isn't quite clear about what these flags do. They act as though every //tracked// file in the repository (`git ls-files`, `hg manifest`, or `svn list -R`) is included in the argument list. They do not lint/test ignored files (and I think almost all users would be very surprised if they did). They also don't lint/test untracked files (files you have not yet used `git add`, `svn add`, or `hg add` on). This is slightly more contentious but we have good reasons for doing it (e.g., `git ls-files` often outperforms `find .` by a large margin) and I believe users very rarely use `--everything` in a situation where they have untracked files. The only real exception I can come up with is linter configuration/development, as in PHI343, and it seems okay to have a slightly surprising behvaior here. Make the documentation more clear about what is in scope. We could also rename these to `--nearly-everything` or whatever, but I think the name is probably clear enough given current information about how confusing this is (specifically: only rarely, in unusual cases). Test Plan: - Grepped for documentation about these flags. - Ran `arc help lint`, `arc help unit`, `arc unit --everything x`, `arc lint --everything x` and read all the new messages. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13061 Differential Revision: https://secure.phabricator.com/D18989
This commit is contained in:
parent
2e02332216
commit
349109426c
2 changed files with 10 additions and 4 deletions
|
@ -135,7 +135,9 @@ EOTEXT
|
||||||
'patches suggested by lint without prompting.'),
|
'patches suggested by lint without prompting.'),
|
||||||
),
|
),
|
||||||
'everything' => array(
|
'everything' => array(
|
||||||
'help' => pht('Lint all files in the project.'),
|
'help' => pht(
|
||||||
|
'Lint all tracked files in the working copy. Ignored files and '.
|
||||||
|
'untracked files will not be linted.'),
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'cache' => pht('%s lints all files', '--everything'),
|
'cache' => pht('%s lints all files', '--everything'),
|
||||||
'rev' => pht('%s lints all files', '--everything'),
|
'rev' => pht('%s lints all files', '--everything'),
|
||||||
|
@ -200,7 +202,8 @@ EOTEXT
|
||||||
if ($everything && $paths) {
|
if ($everything && $paths) {
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
pht(
|
pht(
|
||||||
'You can not specify paths with %s. The %s flag lints every file.',
|
'You can not specify paths with %s. The %s flag lints every '.
|
||||||
|
'tracked file in the working copy.',
|
||||||
'--everything',
|
'--everything',
|
||||||
'--everything'));
|
'--everything'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,9 @@ EOTEXT
|
||||||
'Harbormaster build target.'),
|
'Harbormaster build target.'),
|
||||||
),
|
),
|
||||||
'everything' => array(
|
'everything' => array(
|
||||||
'help' => pht('Run every test.'),
|
'help' => pht(
|
||||||
|
'Run every test associated with a tracked file in the working '.
|
||||||
|
'copy.'),
|
||||||
'conflicts' => array(
|
'conflicts' => array(
|
||||||
'rev' => pht('%s runs all tests.', '--everything'),
|
'rev' => pht('%s runs all tests.', '--everything'),
|
||||||
),
|
),
|
||||||
|
@ -134,7 +136,8 @@ EOTEXT
|
||||||
if ($everything && $paths) {
|
if ($everything && $paths) {
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
pht(
|
pht(
|
||||||
'You can not specify paths with %s. The %s flag runs every test.',
|
'You can not specify paths with %s. The %s flag runs every test '.
|
||||||
|
'associated with a tracked file in the working copy.',
|
||||||
'--everything',
|
'--everything',
|
||||||
'--everything'));
|
'--everything'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue