1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00

Remove verbose output from arc lint --trace

Summary: I think that this output was used during the early stage of `ArcanistConfigurationDrivenLintEngine`, but I question it's value nowadays. In particular, I find that this output makes the output of `arc lint --trace` significantly less useful.

Test Plan: Ran `./bin/arc lint --trace` and saw useful output.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13593
This commit is contained in:
Joshua Spence 2015-07-08 20:03:00 +10:00
parent 23a653e2bb
commit 999eb93765

View file

@ -179,79 +179,38 @@ final class ArcanistConfigurationDrivenLintEngine extends ArcanistLintEngine {
$match = array();
foreach ($paths as $path) {
$console->writeLog("%s\n", pht("Examining path '%s'...", $path));
$keep = false;
if (!$include) {
$keep = true;
$console->writeLog(
" %s\n",
pht('Including path by default because there is no "include" rule.'));
} else {
$console->writeLog(
" %s\n",
pht('Testing "include" rules.'));
foreach ($include as $rule) {
if (preg_match($rule, $path)) {
$keep = true;
$console->writeLog(
" %s\n",
pht('Path matches include rule: %s.', $rule));
break;
} else {
$console->writeLog(
" %s\n",
pht('Path does not match include rule: %s', $rule));
}
}
}
if (!$keep) {
$console->writeLog(
" %s\n",
pht('Path does not match any include rules, discarding.'));
continue;
}
if ($exclude) {
$console->writeLog(
" %s\n",
pht('Testing "exclude" rules.'));
foreach ($exclude as $rule) {
if (preg_match($rule, $path)) {
$console->writeLog(
" %s\n",
pht('Path matches "exclude" rule: %s.', $rule));
continue 2;
} else {
$console->writeLog(
" %s\n",
pht('Path does not match "exclude" rule: %s.', $rule));
}
}
}
if ($global_exclude) {
$console->writeLog(
" %s\n",
pht('Testing global "exclude" rules.'));
foreach ($global_exclude as $rule) {
if (preg_match($rule, $path)) {
$console->writeLog(
" %s\n",
pht('Path matches global "exclude" rule: %s.', $rule));
continue 2;
} else {
$console->writeLog(
" %s\n",
pht('Path does not match global "exclude" rule: %s.', $rule));
}
}
}
$console->writeLog(
" %s\n",
pht('Path matches.'));
$match[] = $path;
}