]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(CS): Ignore apps*/ directories which are gitignored 39989/head
authorJoas Schilling <coding@schilljs.com>
Mon, 21 Aug 2023 14:14:46 +0000 (16:14 +0200)
committerJoas Schilling <coding@schilljs.com>
Mon, 21 Aug 2023 14:14:46 +0000 (16:14 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
.php-cs-fixer.dist.php

index fe6d31065f43bf5481599c2f4ead9e3e805ec23d..2058f8d0d65b9d6ed348e9d74379c35eccc6c1d6 100644 (file)
@@ -21,4 +21,17 @@ $config
        ->notPath('node_modules')
        ->notPath('vendor')
        ->in(__DIR__);
+
+// 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());
+               }
+       }
+}
+
 return $config;