Skip to content

Commit e145d1e

Browse files
Merge branch 'trunk' into dependabot/npm_and_yarn/tar-fs-3.0.9
2 parents 7ad3c94 + fbb8b86 commit e145d1e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

includes/Checker/Checks/Abstract_File_Check.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,18 @@ private static function get_files( Check_Context $plugin ) {
281281
self::$file_list_cache[ $location ][] = $location;
282282
} else {
283283
$iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $location ) );
284+
285+
$directories_to_ignore = Plugin_Request_Utility::get_directories_to_ignore();
286+
287+
$files_to_ignore = Plugin_Request_Utility::get_files_to_ignore();
288+
284289
foreach ( $iterator as $file ) {
285290
if ( ! $file->isFile() ) {
286291
continue;
287292
}
288293

289294
$file_path = wp_normalize_path( $file->getPathname() );
290295

291-
$directories_to_ignore = Plugin_Request_Utility::get_directories_to_ignore();
292-
293296
// Flag to check if the file should be included or not.
294297
$include_file = true;
295298

@@ -301,8 +304,6 @@ private static function get_files( Check_Context $plugin ) {
301304
}
302305
}
303306

304-
$files_to_ignore = Plugin_Request_Utility::get_files_to_ignore();
305-
306307
foreach ( $files_to_ignore as $ignore_file ) {
307308
if ( str_ends_with( $file_path, "/$ignore_file" ) ) {
308309
$include_file = false;

0 commit comments

Comments
 (0)