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

Modify Plugin Checker to only check root directory readme files #240

Closed
1 task done
mukeshpanchal27 opened this issue Aug 3, 2023 · 0 comments · Fixed by #241
Closed
1 task done

Modify Plugin Checker to only check root directory readme files #240

mukeshpanchal27 opened this issue Aug 3, 2023 · 0 comments · Fixed by #241
Assignees
Labels
[Type] Bug An existing feature is broken

Comments

@mukeshpanchal27
Copy link
Member

mukeshpanchal27 commented Aug 3, 2023

Describe the bug

Followup issue #239 (comment)

The Plugin Checker currently examines all files, including those in subfolders, to validate readme.txt and readme.md files. However, this behaviour should be adjusted to focus solely on files in the root directory of the plugin for readme checks.

WordPress allows and parses readme.txt and readme.md files in the root directory of the plugin. Therefore, the Plugin Checker should be updated to consider only these root directory files.

For example, when testing the WooCommerce plugin, the Plugin Checker returned an array of files as follows:

/var/www/html/wp-content/plugins/woocommerce/Array
(
    [1511] => /var/www/html/wp-content/plugins/woocommerce/packages/action-scheduler/readme.txt
    [1668] => /var/www/html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/README.MD
    [3531] => /var/www/html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/readme.txt
    [3962] => /var/www/html/wp-content/plugins/woocommerce/readme.txt
)

The specific error highlighted was:

FILE: packages/action-scheduler/readme.txt

Line Column Type Code Message
0 0 WARNING stable_tag_mismatch The Stable Tag in your readme file does not match the version in your main plugin file.

To address this issue, the Plugin Checker should be updated to only report errors for readme.txt and readme.md files that exist directly in the root directory of the plugin and not in any subfolders. This adjustment will ensure accurate validation of these critical files.

Steps to Reproduce

  1. Install and activate WooCommerce Plugin
  2. Run checks using Plugin Checker
  3. It show stable_tag_mismatch error from sub directory file packages/action-scheduler/readme.txt

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mukeshpanchal27 mukeshpanchal27 added the [Type] Bug An existing feature is broken label Aug 3, 2023
@mukeshpanchal27 mukeshpanchal27 self-assigned this Aug 3, 2023
@mukeshpanchal27 mukeshpanchal27 moved this to In Progress in Plugin Check Aug 3, 2023
@mukeshpanchal27 mukeshpanchal27 moved this from In Progress to Code Review in Plugin Check Aug 3, 2023
@github-project-automation github-project-automation bot moved this from Code Review to Done in Plugin Check Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant