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

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

Closed
joemcgill opened this issue Jun 27, 2024 · 3 comments · Fixed by #490
Closed

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

joemcgill opened this issue Jun 27, 2024 · 3 comments · Fixed by #490
Assignees
Labels
Needs Dev Anything that requires development (e.g. a pull request) WP-CLI Issues related to WP-CLI
Milestone

Comments

@joemcgill
Copy link
Member

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 #441 (comment), 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.

@joemcgill joemcgill added Needs Dev Anything that requires development (e.g. a pull request) WP-CLI Issues related to WP-CLI labels Jun 27, 2024
@swissspidy
Copy link
Member

Related:

@davidperezgar
Copy link
Member

davidperezgar commented Jun 28, 2024

Yes! It's necessary for the form submission.

@davidperezgar
Copy link
Member

I've commited first approach how to use in an arbitrary path. It's working. Only rename variables would need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Dev Anything that requires development (e.g. a pull request) WP-CLI Issues related to WP-CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants