You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.php-cs-fixer.dist.php 981B

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