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

Detect missing readme headers #414

Merged
merged 9 commits into from
Jun 30, 2024

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar commented Feb 5, 2024

Related to #402

  • Added check_headers() method in Plugin_Readme_Check
  • Add separate private method for getting ignored filters get_ignored_warnings()
  • Two headers are checked here:
    • Tested up to
    • Contributors
  • New method will check if those fields are empty
  • Checking for the field is enabled/disabled based on wp_plugin_check_ignored_readme_warnings
  • Since contributor_ignored is returned from the above filter, detecting of Contributors is disabled.

If the PR is acceptable then I will add tests for the changes and update other tests accordingly. Other tests also need to be updated because currently we have assumed there will be no warning for missing Tested up to field.

@ernilambar
Copy link
Member Author

@ernilambar ernilambar marked this pull request as ready for review March 18, 2024 07:24
@davidperezgar davidperezgar self-requested a review June 20, 2024 14:28
@frantorres frantorres assigned frantorres and unassigned frantorres Jun 22, 2024
@frantorres frantorres self-requested a review June 22, 2024 11:55
@frantorres
Copy link

frantorres commented Jun 22, 2024

Hi @ernilambar thanks for the change. It looks good, if you finish the tests I can continue with the review.

@ernilambar
Copy link
Member Author

PR has been rebased with trunk and few more updates have been done.

@davidperezgar davidperezgar added the [Team] Plugin Review Issues owned by Plugin Review Team label Jun 26, 2024
@davidperezgar
Copy link
Member

davidperezgar commented Jun 28, 2024

For me It's ok after all changes! In the future, we would need to get the actual version of WordPress somewhere and create a warning if it's not getting an actual version.

Copy link
Member

@davidperezgar davidperezgar left a comment

Choose a reason for hiding this comment

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

Everything seems OK!

@davidperezgar
Copy link
Member

davidperezgar commented Jun 29, 2024

I would add to check the actual version of WordPress. It must be Tested up "actual version".

In order to have always the latest version, I've asked to meta, and we have some methods to check that:

Yes, use one of these:
https://api.wordpress.org/core/stable-check/1.0/
3rd line of https://api.wordpress.org/core/version-check/1.1/
Or just json decode https://api.wordpress.org/core/version-check/1.7/

So finally we have a complete check.

The error that we show to the users is something like this ERROR: Tested up to: 6.4 < 6.5

@davidperezgar davidperezgar self-requested a review June 29, 2024 10:14
@ernilambar
Copy link
Member Author

@davidperezgar Should this be done in this same PR or separate PR?

@davidperezgar
Copy link
Member

In a separate Issue. I'll create the issue #481

@davidperezgar davidperezgar merged commit d017f6a into WordPress:trunk Jun 30, 2024
17 of 18 checks passed
Copy link
Member

@davidperezgar davidperezgar left a comment

Choose a reason for hiding this comment

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

Ok

@ernilambar ernilambar deleted the 402-detect-missing-headers branch June 30, 2024 15:59
@swissspidy swissspidy modified the milestones: 1.1.0, 1.0.2 Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team
4 participants