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

Add archive check workflow #136

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexP11223
Copy link
Contributor

Please check if the PR fulfills these requirements

  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce?
feature (new workflow)

The workflow runs some checks on the plugin archive to make sure that everything is ok (especially important if processing the source code via php-scoper or Rector).

It executes Parallel Lint to check the PHP syntax, and Plugin Check phpcs ruleset, as well as other specified WP sniffs (by default I18n, because in some cases the translators: comments can be deleted by php-scoper).

It clones the Plugin Check repo and installs its composer deps, this seems to be the only quick way to use Plugin Check without WP and Docker, and it's a simple way to get phpcs and WP sniffs, since the plugin archive does not include the dev deps.

One issue here is that phpcs CLI is more limited than the config file. For example it’s not possible to ignore only the exception escaping errors when running the escaping sniff. But copying and maintaining the config for archive checking in each plugin seems like too much work, so for now trying like this.

@AlexP11223 AlexP11223 requested a review from Biont July 10, 2024 06:40
@AlexP11223 AlexP11223 marked this pull request as ready for review July 10, 2024 06:40
@luislard
Copy link
Contributor

luislard commented Aug 12, 2024

One issue here is that phpcs CLI is more limited than the config file. For example it’s not possible to ignore only the exception escaping errors when running the escaping sniff. But copying and maintaining the config for archive checking in each plugin seems like too much work, so for now trying like this.

Don't know if it is your use case, or if you really need it, but, see how we added a default config file here,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants