.php-cs-fixer.dist.php 854 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. require_once './vendor-bin/cs-fixer/vendor/autoload.php';
  4. use Nextcloud\CodingStandard\Config;
  5. $config = new Config();
  6. $config
  7. ->getFinder()
  8. ->ignoreVCSIgnored(true)
  9. ->exclude('config')
  10. ->exclude('data')
  11. ->notPath('3rdparty')
  12. ->notPath('build/integration/vendor')
  13. ->notPath('build/lib')
  14. ->notPath('build/node_modules')
  15. ->notPath('build/stubs')
  16. ->notPath('composer')
  17. ->notPath('node_modules')
  18. ->notPath('vendor')
  19. ->in('apps')
  20. ->in(__DIR__);
  21. // Ignore additional app directories
  22. $rootDir = new \DirectoryIterator(__DIR__);
  23. foreach ($rootDir as $node) {
  24. if (str_starts_with($node->getFilename(), 'apps')) {
  25. $return = shell_exec('git check-ignore ' . escapeshellarg($node->getFilename() . '/'));
  26. if ($return !== null) {
  27. $config->getFinder()->exclude($node->getFilename());
  28. }
  29. }
  30. }
  31. return $config;