Skip to content

Add archive check workflow#136

Open
AlexP11223 wants to merge 1 commit intomainfrom
feature/PROD-172-check-archive
Open

Add archive check workflow#136
AlexP11223 wants to merge 1 commit intomainfrom
feature/PROD-172-check-archive

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,

Comment on lines +59 to +60
- name: Run Parallel Lint
run: parallel-lint .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I put it here because the workflow cannot run on the extracted artifact. Though the new unified build may solve that.

@tyrann0us tyrann0us requested a review from a team as a code owner July 1, 2025 11:55
@tyrann0us tyrann0us force-pushed the main branch 2 times, most recently from 4b2c3d7 to a810bb3 Compare July 1, 2025 11:57
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.

4 participants