Skip to content

Commit

Permalink
ignore folders for scoping
Browse files Browse the repository at this point in the history
  • Loading branch information
ata-no-one committed Nov 25, 2024
1 parent e96bea4 commit f856c7f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"autoload": {
"psr-4": {
"OCP\\": "vendor/nextcloud/ocp/OCP",
"OCA\\Files_Trashbin\\": "nextcloud-server/apps/files_trashbin",
"OCA\\GDataVaas\\": "lib"
}
},
Expand Down
29 changes: 23 additions & 6 deletions scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,32 @@
// ),
// );
$excludedFiles = [
'templates/admin.php',
'templates/exception.php',
'templates/xml_exception.php',
'src/admin-settings.js',
'src/files-action.js',
'src/main.js',
'css/style.css',
'LICENSES/AGPL-3.0-or-later.txt'
];
$excludedFolders = array_merge(
array_map(
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathname(),
iterator_to_array(
Finder::create()
->in('templates')
->files(),
false,
),
),
array_map(
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathname(),
iterator_to_array(
Finder::create()
->in('src')
->files(),
false,
),
));

exit();

$excludedFiles = array_merge($excludedFiles, $excludedFolders);

return [
// The prefix configuration. If a non-null value is used, a random prefix
Expand Down

0 comments on commit f856c7f

Please sign in to comment.