Skip to content

Commit

Permalink
Merge branch 'trunk' into 691-show-errors-with-severity-less-than-a-n…
Browse files Browse the repository at this point in the history
…umber-as-a-warning
  • Loading branch information
davidperezgar authored Oct 11, 2024
2 parents 9fed972 + b5b33ec commit 04fcb86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/Checker/Checks/Plugin_Repo/File_Type_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@ protected function look_for_application_files( Check_Result $result, array $file
protected function look_for_badly_named_files( Check_Result $result, array $files ) {
$conflict_chars = '!@#$%^&*()+=[]{};:"\'<>,?/\\|`~';

$plugin_path = $result->plugin()->path();

$files = array_map(
function ( $file ) use ( $plugin_path ) {
return str_replace( $plugin_path, '', $file );
},
$files
);

foreach ( $files as $file ) {
$badly_name = false;
if ( preg_match( '/\s/', $file ) ) {
Expand Down

0 comments on commit 04fcb86

Please sign in to comment.