Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check minor version tested up #886

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

davidperezgar
Copy link
Member

Fixes #885

Copy link

github-actions bot commented Mar 5, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: davidperezgar <[email protected]>
Co-authored-by: ernilambar <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@@ -491,8 +509,8 @@ public function test_run_with_errors_tested_up_to_latest_plus_two_version() {
$filtered_items = wp_list_filter( $errors['readme.md'][0][0], array( 'code' => 'nonexistent_tested_upto_header' ) );

$this->assertCount( 1, $filtered_items );
$this->assertStringContainsString( 'Tested up to: 6.1', $filtered_items[0]['message'] );
$this->assertStringContainsString( 'This version of WordPress does not exist (yet).', $filtered_items[0]['message'] );
$this->assertStringContainsString( 'Tested up to: 6.1', $filtered_items[1]['message'] );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this test was affected by the PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap. I think that is because of the array of elements.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$filtered_items = array_values( wp_list_filter( $errors['readme.md'][0][0], array( 'code' => 'nonexistent_tested_upto_header' ) ) ); If we use array_values() here we could make test more robust and it will whatever position this exists in the $errors array.

@davidperezgar
Copy link
Member Author

@ernilambar I'm having this problem:

/home/runner/work/plugin-check/plugin-check/includes/Checker/Checks/Plugin_Repo/Plugin_Readme_Check.php:195  ExcessiveMethodLength  The method check_headers() has 100 lines of code. Current threshold is set to 100. Avoid really long methods.
Script phpmd . text phpmd.xml handling the phpmd event returned with error code 2

How could avoid that?

@davidperezgar
Copy link
Member Author

I've solved. I saw where to avoid that directive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check: Don't allow to use minor versions in Tested Up
2 participants