Skip to content

Commit

Permalink
add some more files to ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ata-no-one committed Nov 21, 2024
1 parent 452012d commit 523a58e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/EventListener/FileEventsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
use OC_Template;
use OCA\Files_Versions\Versions\IVersionManager;
use OCA\GDataVaas\Service\FileService;
use OCA\GDataVaas\Service\TagService;
use OCA\GDataVaas\Service\VerdictService;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Files\IMimeTypeLoader;
use OCP\Files\IRootFolder;
use OCP\HintException;
Expand All @@ -19,8 +21,6 @@
use OCP\IUserSession;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Server;
use OCA\GDataVaas\Service\TagService;
use OCP\Files\Events\Node\NodeWrittenEvent;

/** @template-implements IEventListener<BeforeNodeCopiedEvent|BeforeNodeDeletedEvent|BeforeNodeRenamedEvent|BeforeNodeTouchedEvent|BeforeNodeWrittenEvent|NodeCopiedEvent|NodeCreatedEvent|NodeDeletedEvent|NodeRenamedEvent|NodeTouchedEvent|NodeWrittenEvent> */
class FileEventsListener implements IEventListener {
Expand Down
44 changes: 37 additions & 7 deletions scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,26 @@
// false,
// ),
// );
$excludedFiles = [
'templates/admin.php',
'templates/exception.php',
'templates/xml_exception.php'
];
$excludedFiles =[];
$excludedFiles = array_map(
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathName(),
iterator_to_array(
Finder::create()->files()->in(__DIR__.'/src'),
false,
),
iterator_to_array(
Finder::create()->files()->in(__DIR__.'/templates'),
false,
),
iterator_to_array(
Finder::create()->files()->in(__DIR__.'/css'),
false,
),
iterator_to_array(
Finder::create()->files()->in(__DIR__.'/LICENSES'),
false,
)
);

return [
// The prefix configuration. If a non-null value is used, a random prefix
Expand All @@ -46,11 +61,27 @@
'finders' => [
Finder::create()
->files()
->notName('babel.config.js')
->notName('compose-install.yaml')
->notName('composer.local.*')
->notName('devcontainer.yaml')
->notName('Dockerfile.Nextcloud')
->notName('empty-skeleton.config.php')
->notName('*.sh')
->notName('Makefile')
->notName('*.ini')
->notName('psalm.xml')
->notName('start-dev-environment*')
->notName('scoper.inc.php')
->notName('stylelint.config.js')
->notName('use-*-vaas.sh')
->notName('webpack.config.js')
->notName('xdebug.*')
->notName('babel.config.js')
->ignoreVCS(true)
->ignoreDotFiles(true)
->exclude([
'build',
'.devcontainer',
'nextcloud-server',
'tests',
'tmp',
Expand All @@ -65,7 +96,6 @@
//
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#patchers
'exclude-files' => [
// 'src/an-excluded-file.php',
...$excludedFiles,
],

Expand Down

0 comments on commit 523a58e

Please sign in to comment.