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
swissspidy authored Oct 15, 2024
2 parents 9342dda + e993242 commit 0b631d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@ public function run( Check_Result $result ) {
);

$restricted_labels = array(
'BitbucketPluginURI' => 'Bitbucket Plugin URI',
'GistPluginURI' => 'Gist Plugin URI',
'GiteaPluginURI' => 'Gitea Plugin URI',
'GitHubPluginURI' => 'GitHub Plugin URI',
'GitLabPluginURI' => 'GitLab Plugin URI',
);
'RestrictedLabel' => 'Restricted Label',
); // Reserved for future use.

$plugin_header = $this->get_plugin_data( $plugin_main_file, array_merge( $labels, $restricted_labels ) );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function test_run_with_errors() {
$this->assertNotEmpty( $errors );
$this->assertNotEmpty( $warnings );

$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_restricted_fields' ) ) );
$this->assertCount( 0, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_restricted_fields' ) ) );
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_requires_wp' ) ) );
$this->assertCount( 1, wp_list_filter( $errors['load.php'][0][0], array( 'code' => 'plugin_header_invalid_requires_php' ) ) );
$this->assertCount( 1, wp_list_filter( $warnings['load.php'][0][0], array( 'code' => 'plugin_header_invalid_plugin_uri_domain' ) ) );
Expand Down

0 comments on commit 0b631d9

Please sign in to comment.