chore(rector): Move rector.php into the build folder

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-09-23 11:58:27 +02:00
parent f9f95cf66d
commit 98efa3bda8
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
2 changed files with 16 additions and 14 deletions

View file

@ -9,29 +9,31 @@ declare(strict_types=1);
use Rector\Config\RectorConfig;
$nextcloudDir = dirname(__DIR__);
$config = RectorConfig::configure()
->withPaths([
__DIR__ . '/apps',
// __DIR__ . '/config',
// __DIR__ . '/core',
// __DIR__ . '/lib',
// __DIR__ . '/ocs',
// __DIR__ . '/ocs-provider',
// __DIR__ . '/tests',
// __DIR__ . '/themes',
$nextcloudDir . '/apps',
// $nextcloudDir . '/config',
// $nextcloudDir . '/core',
// $nextcloudDir . '/lib',
// $nextcloudDir . '/ocs',
// $nextcloudDir . '/ocs-provider',
// $nextcloudDir . '/tests',
// $nextcloudDir . '/themes',
])
->withSkip([
__DIR__ . '/apps/*/3rdparty/*',
__DIR__ . '/apps/*/build/stubs/*',
__DIR__ . '/apps/*/composer/*',
__DIR__ . '/apps/*/config/*',
$nextcloudDir . '/apps/*/3rdparty/*',
$nextcloudDir . '/apps/*/build/stubs/*',
$nextcloudDir . '/apps/*/composer/*',
$nextcloudDir . '/apps/*/config/*',
])
// uncomment to reach your current PHP version
// ->withPhpSets()
->withTypeCoverageLevel(0);
$ignoredEntries = shell_exec('git status --porcelain --ignored ' . escapeshellarg(__DIR__));
$ignoredEntries = shell_exec('git status --porcelain --ignored ' . escapeshellarg($nextcloudDir));
$ignoredEntries = explode("\n", $ignoredEntries);
$ignoredEntries = array_filter($ignoredEntries, static fn (string $line) => str_starts_with($line, '!! '));
$ignoredEntries = array_map(static fn (string $line) => substr($line, 3), $ignoredEntries);

View file

@ -68,7 +68,7 @@
"test": "phpunit --configuration tests/phpunit-autotest.xml",
"test:db": "@composer run test -- --group DB,SLOWDB",
"test:files_external": "phpunit --configuration tests/phpunit-autotest-external.xml",
"rector": "rector && composer cs:fix"
"rector": "rector --config=build/rector.php && composer cs:fix"
},
"extra": {
"bamarni-bin": {