diff options
author | Joas Schilling <coding@schilljs.com> | 2023-08-21 16:14:46 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-08-21 16:14:46 +0200 |
commit | cc551acaaaadaa56516ce8774afc3f7495e61d85 (patch) | |
tree | 69c76f0f3bd9d5c82a251d1e50da8cc331680423 /.php-cs-fixer.dist.php | |
parent | 4c2c53e2716a2a946ad7ec574833e3c9837819bf (diff) | |
download | nextcloud-server-cc551acaaaadaa56516ce8774afc3f7495e61d85.tar.gz nextcloud-server-cc551acaaaadaa56516ce8774afc3f7495e61d85.zip |
fix(CS): Ignore apps*/ directories which are gitignored
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to '.php-cs-fixer.dist.php')
-rw-r--r-- | .php-cs-fixer.dist.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index fe6d31065f4..2058f8d0d65 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -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; |