mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
lint: fail early if no lint engine is defined
Summary: Update the lint workflow to exit immediately it there is no lint engine configured. Previously it scanned the repository to find the paths to check before failing in this case. Scanning the repository can be relatively slow on large repositories. Test Plan: Ran "arc lint" in a large repository with no lint engine configured. Verified that it failed quickly, without scanning the repository first. Reviewed By: jungejason Reviewers: jungejason, epriestley CC: aran, jungejason Differential Revision: 297
This commit is contained in:
parent
3a559ddd13
commit
952fa69f72
1 changed files with 5 additions and 6 deletions
|
@ -96,6 +96,11 @@ EOTEXT
|
|||
$engine = $this->getArgument('engine');
|
||||
if (!$engine) {
|
||||
$engine = $working_copy->getConfig('lint_engine');
|
||||
if (!$engine) {
|
||||
throw new ArcanistNoEngineException(
|
||||
"No lint engine configured for this project. Edit .arcconfig to ".
|
||||
"specify a lint engine.");
|
||||
}
|
||||
}
|
||||
|
||||
$should_lint_all = $this->getArgument('lintall');
|
||||
|
@ -153,12 +158,6 @@ EOTEXT
|
|||
}
|
||||
}
|
||||
|
||||
if (!$engine) {
|
||||
throw new ArcanistNoEngineException(
|
||||
"No lint engine configured for this project. Edit .arcconfig to ".
|
||||
"specify a lint engine.");
|
||||
}
|
||||
|
||||
PhutilSymbolLoader::loadClass($engine);
|
||||
|
||||
$engine = newv($engine, array());
|
||||
|
|
Loading…
Reference in a new issue