Opened 8 months ago
Last modified 6 months ago
#7556 new enhancement
Run PCP function to test plugin in plugin submission process
Reported by: | barrykooij | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
When a user submits a new plugin to the directory, we want to run a function within PCP which checks if the new submission passes a collection of automated checks. If not, we want to block the submission and inform the user why.
The first version within PCP would be a set of PHPCS rules that are always blocking. Later we can expand on this with for example a readme parser. We are discussing what PHPCS rules should be included on Github: https://github.com/WordPress/plugin-check/issues/440
This trac ticket is to talk about if this is possible and how we can do this.
Change History (4)
#2
follow-up:
↓ 3
@
6 months ago
Hello! Could you give us more detail of the output that plugin will make? An array? json? etc? We actually have a WP CLI and we could make a Class as well. Could you give us what is more convenient for you?
#3
in reply to:
↑ 2
@
6 months ago
Replying to davidperez:
Hello! Could you give us more detail of the output that plugin will make? An array? json? etc? We actually have a WP CLI and we could make a Class as well. Could you give us what is more convenient for you?
Hey David. This is clear on our end. We will create a function that can be called within meta. This will return a bool (PASS/FAIL) and an array with "results"(strings) (Any errors/warnings/notes etc.)
To integrate it...
The minimum we need to know is:
A pass with a long list of errors is acceptable, if those errors might be false-positives, as long as we have a way of knowing that it's a PASS/FAIL.
What we need code wise:
/tmp/plugin-submission-123oeiwlsf
), any metadata about the plugin needed (ie. WordPress.org uploader name), and can return the above information.