Add plugin-check-info.json manifest for third-party paths - #1439
Add plugin-check-info.json manifest for third-party paths#1439faisalahammad wants to merge 2 commits into
Conversation
Add a standalone plugin-check-info.json manifest that lets plugin authors declare bundled third-party paths. After checks run, warning messages inside declared paths are removed from results while errors and all other findings stay untouched. The shared runner applies this to both CLI and admin check runs. Missing or invalid manifest entries are ignored, so existing behavior is preserved when no configuration exists.
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @shawn-digitalpoint, @DavidAnderson684. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
- extract third-party warning filtering from run() to filter_third_party_warnings() PHPMD: Abstract_Check_Runner run() NPath 384 over 200 threshold PHP 7.4-compatible. All CI checks passing. Refs WordPress#1439
CI Fix Summary — 1 failure resolved
Tests ✅ (phpmd, lint, phpstan) · Verification ✅ · PHP 7.4 ✅ |
What?
Closes #760
Add support for a committed
plugin-check-info.jsonmanifest that declares bundled third-party paths.Why?
Plugin Check currently reports warning-level recommendations inside vendor code that plugin authors do not control. This creates noisy results. Errors must remain visible.
How?
Add a shared configuration helper that reads and validates the manifest from the plugin root. After checks run, the shared runner removes warnings whose plugin-relative file path matches a declared third-party path. Errors and findings outside declared paths remain unchanged. The same result filtering is used by CLI and admin AJAX runs.
Path matching uses normalized, relative paths with directory boundaries. Missing or malformed manifests are treated as no configuration.
Testing Instructions
plugin-check-info.jsonto a test plugin root:{ "third_parties": [ "vendor/example-library" ] }vendor/example-library/.Automated validation:
composer lintpasses.composer phpstanpasses.git diff --checkpasses.The local PHPUnit command without wp-env was blocked by missing WordPress test environment constants. CodeRabbit follow-up review was rate limited after the initial review completed with no findings.
AI Usage Disclosure
Used an AI coding assistant to inspect the repository, implement the manifest parsing and result filtering, add tests and documentation, and run validation commands. All changes were reviewed and tested locally.
Screenshots or screencast
Not applicable. This changes check result filtering and does not change the UI layout.