WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
195 stars 39 forks source link

Allow static checks to be run against an arbitrary path #478

Open joemcgill opened 4 days ago

joemcgill commented 4 days ago

Currently the WP CLI command is limited to only run checks against plugins that are installed on the same site as Plugin Check.

This is because it eventually calls the Plugin_Request_Utility::get_plugin_basename_from_input() method during the setup process which throws an Exception if the plugin is not installed.

To satisfy the requirements of https://github.com/WordPress/plugin-check/issues/441#issuecomment-2190961036, we need to be able to run checks against a plugin that is located outside the WordPress filesystem, e.g. /tmp.

Ideally, this would work by passing a CLI command like:

wp plugin check /tmp/plugin-path

When the path is not to an active plugin, only static checks should be eligible to be run.

swissspidy commented 4 days ago

Related:

davidperezgar commented 3 days ago

Yes! It's necessary for the form submission.