WordPress / WordPress/plugin-check

Implement exclusion of rules for the check results

Open
#823 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Enhancement Infrastructure
Dominant language
PHP
Stars
362
Forks
126
Avg merge
1d 23h
Merged PRs (30d)
22

Description

Related to https://github.com/WordPress/plugin-check/issues/769

In actual this is more advanced form of above issue.

For application of PCP checks to the existing plugin in the directory, we need a mechanism for excluding certain error codes in certain files or directories. This is required because it is not possible to apply all PCP rules to the existing plugins without breaking those.

Few cases:

  1. Exclude single error code in general:

Example:

mismatched_plugin_name
  1. Exclude error code in certain files:

Example:

PluginCheck.CodeAnalysis.Offloading
-  /folder-one/file-1.php
-  /folder-one/file-2.php
-  /folder-two/sub-folder/file-2.php
  1. Exclude error code in certain folders:

Example:

PluginCheck.CodeAnalysis.Offloading
-  /folder-one/
-  /another-folder/sub-folder/
  1. Excluding could also be combination of 2 and 3.

Example:

PluginCheck.CodeAnalysis.Offloading
-  /folder-one/file-1.php
-  /folder-another/
-  /folder-two/sub-folder/

A set of rules would be assigned for each plugin which will be reviewed and approved by the reviewer manually.

Issue is here for tracking and gathering ideas and feedbacks regarding the implementation.

Questions:

  1. In what format will we keep these rules?
  2. How to make rules extendable and future-proof?
  3. How will CLI/admin take these rules in the processing of the output?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing related issue #769 and the exclusion examples in this issue. Done would require an agreed, extendable rule format plus a defined way for CLI or admin processing to apply those exclusions; no implementation files or tests are identified yet.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.