mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-23 22:10:54 +01:00
Use ArcanistPhutilLibraryLinter, not ArcanistPhutilModuleLinter
Summary: - The library linter works fine on v1 or v2 libraries, so switch to it for all libraries. - "arc liberate" on v1 libraries will still invoke the Module linter, and thus generate __init__.php files. Test Plan: Ran "arc lint". Grepped for module linter. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran Maniphest Tasks: T1103 Differential Revision: https://secure.phabricator.com/D2620
This commit is contained in:
parent
5aef938391
commit
d80c4f683e
2 changed files with 4 additions and 19 deletions
|
@ -28,17 +28,6 @@ final class ComprehensiveLintEngine extends ArcanistLintEngine {
|
|||
|
||||
$paths = $this->getPaths();
|
||||
|
||||
// This needs to go first so that changes to generated files cause module
|
||||
// linting. This linter also operates on removed files, because removing
|
||||
// a file changes the static properties of a module.
|
||||
$module_linter = new ArcanistPhutilModuleLinter();
|
||||
$linters[] = $module_linter;
|
||||
foreach ($paths as $path) {
|
||||
$module_linter->addPath($path);
|
||||
}
|
||||
|
||||
// Remaining lint engines operate on file contents and ignore removed
|
||||
// files.
|
||||
foreach ($paths as $key => $path) {
|
||||
if (!$this->pathExists($path)) {
|
||||
unset($paths[$key]);
|
||||
|
|
|
@ -30,17 +30,13 @@ class PhutilLintEngine extends ArcanistLintEngine {
|
|||
|
||||
$paths = $this->getPaths();
|
||||
|
||||
// This needs to go first so that changes to generated files cause module
|
||||
// linting. This linter also operates on removed files, because removing
|
||||
// a file changes the static properties of a module.
|
||||
$module_linter = new ArcanistPhutilModuleLinter();
|
||||
$linters[] = $module_linter;
|
||||
$library_linter = new ArcanistPhutilLibraryLinter();
|
||||
$linters[] = $library_linter;
|
||||
foreach ($paths as $path) {
|
||||
$module_linter->addPath($path);
|
||||
$library_linter->addPath($path);
|
||||
}
|
||||
|
||||
// Remaining lint engines operate on file contents and ignore removed
|
||||
// files.
|
||||
// Remaining linters operate on file contents and ignore removed files.
|
||||
foreach ($paths as $key => $path) {
|
||||
if (!$this->pathExists($path)) {
|
||||
unset($paths[$key]);
|
||||
|
|
Loading…
Reference in a new issue