2020-03-27 16:54:07 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2022-01-06 14:19:06 +01:00
|
|
|
require_once './vendor-bin/cs-fixer/vendor/autoload.php';
|
2020-03-27 16:54:07 +01:00
|
|
|
|
|
|
|
use Nextcloud\CodingStandard\Config;
|
|
|
|
|
|
|
|
$config = new Config();
|
|
|
|
$config
|
|
|
|
->getFinder()
|
2022-01-06 14:19:06 +01:00
|
|
|
->ignoreVCSIgnored(true)
|
2020-03-27 16:54:07 +01:00
|
|
|
->exclude('config')
|
|
|
|
->exclude('data')
|
|
|
|
->notPath('3rdparty')
|
2021-03-31 10:09:18 +02:00
|
|
|
->notPath('build/integration/vendor')
|
|
|
|
->notPath('build/lib')
|
|
|
|
->notPath('build/node_modules')
|
2020-07-15 22:38:09 +02:00
|
|
|
->notPath('build/stubs')
|
2020-03-27 16:54:07 +01:00
|
|
|
->notPath('composer')
|
2021-01-12 10:15:48 +01:00
|
|
|
->notPath('node_modules')
|
2020-03-27 16:54:07 +01:00
|
|
|
->notPath('vendor')
|
2023-11-23 10:22:52 +01:00
|
|
|
->in('apps')
|
2020-03-27 16:54:07 +01:00
|
|
|
->in(__DIR__);
|
2023-08-21 16:14:46 +02:00
|
|
|
|
|
|
|
// Ignore additional app directories
|
|
|
|
$rootDir = new \DirectoryIterator(__DIR__);
|
|
|
|
foreach ($rootDir as $node) {
|
|
|
|
if (str_starts_with($node->getFilename(), 'apps')) {
|
|
|
|
$return = shell_exec('git check-ignore ' . escapeshellarg($node->getFilename() . '/'));
|
|
|
|
|
|
|
|
if ($return !== null) {
|
|
|
|
$config->getFinder()->exclude($node->getFilename());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-27 16:54:07 +01:00
|
|
|
return $config;
|