Change "lint save" to not use Arcanist Projects

Summary: Ref T7604. Change `DiffusionLintSaveRunner` to use repositories instead of Arcanist Projects.

Test Plan: Ran the `save_lint.php` script and queried results using the `diffusion.getlintmessages` Conduit endpoint.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7604

Differential Revision: https://secure.phabricator.com/D12893
This commit is contained in:
Joshua Spence
2015-05-19 00:07:46 +10:00
parent 898ce6bace
commit f8b7f03145
3 changed files with 49 additions and 26 deletions

View File

@@ -17,35 +17,38 @@ $args = id(new PhutilArgumentParser($argv))
->parse(array(
array(
'name' => 'all',
'help' =>
'help' => pht(
'Discover problems in the whole repository instead of just changes '.
'since the last run.',
'since the last run.'),
),
array(
'name' => 'arc',
'param' => 'path',
'default' => 'arc',
'help' => 'Path to Arcanist executable.',
'help' => pht('Path to Arcanist executable.'),
),
array(
'name' => 'severity',
'param' => 'string',
'default' => ArcanistLintSeverity::SEVERITY_ADVICE,
'help' => 'Minimum severity, one of ArcanistLintSeverity constants.',
'help' => pht(
'Minimum severity, one of %s constants.',
'ArcanistLintSeverity'),
),
array(
'name' => 'chunk-size',
'param' => 'number',
'default' => 256,
'help' => 'Number of paths passed to `arc` at once.',
'help' => pht('Number of paths passed to `%s` at once.', 'arc'),
),
array(
'name' => 'blame',
'help' => 'Assign lint errors to authors who last modified the line.',
'help' => pht(
'Assign lint errors to authors who last modified the line.'),
),
));
echo "Saving lint errors to database...\n";
echo pht('Saving lint errors to database...')."\n";
$count = id(new DiffusionLintSaveRunner())
->setAll($args->getArg('all', false))
@@ -55,4 +58,4 @@ $count = id(new DiffusionLintSaveRunner())
->setNeedsBlame($args->getArg('blame'))
->run('.');
echo "\nProcessed {$count} files.\n";
echo "\n".pht('Processed %d files.', $count)."\n";