Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidperezgar committed Oct 24, 2024
1 parent 290b5cc commit bf1eb07
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/Checker/Checks/Plugin_Repo/File_Type_Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,16 @@ function ( $file ) use ( $plugin_path ) {
*/
protected function look_for_library_core_files( Check_Result $result, array $files ) {
// Known libraries that are part of WordPress core.
// https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits/wp-59.php#L739
$look_known_LibrariesCore_services = array(
// https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/credits/wp-59.php#L739 .
$look_known_libraries_core_services = array(
'(?<![\.|-])jquery(-[0-9|\.]*)?(\.slim)?(\.min)?\.js(?!\/)',
'jquery-ui(-[0-9|\.]*)?(\.slim)?(\.min)?\.js(?!\/)',
'jquery.color(\.slim)?(\.min)?\.js(?!\/)',
'jquery.ui.touch-punch(?!\/)',
'jquery.hoverintent(?!\/)',
'jquery.imgareaselect(?!\/)',
'jquery.hotkeys(?!\/)',
'jquery.ba-serializeobject(?!\/)',
'jquery.ba-serializeobject(?!\/)', // spellchecker:disable-line

Check warning on line 320 in includes/Checker/Checks/Plugin_Repo/File_Type_Check.php

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"ba" should be "by" or "be".
'jquery.query-object(?!\/)',
'jquery.suggest(?!\/)',
'polyfill(\.min)?\.js(?!\/)',
Expand All @@ -344,7 +344,8 @@ protected function look_for_library_core_files( Check_Result $result, array $fil
'PHPMailer\.php(?!\/)',
'SimplePie\.php(?!\/)',
);
$combined_pattern = '/(' . implode(')|(', $look_known_LibrariesCore_services ) . ')/i';

$combined_pattern = '/(' . implode( ')|(', $look_known_libraries_core_services ) . ')/i';

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

Expand Down

0 comments on commit bf1eb07

Please sign in to comment.