Conversation
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, |
| - name: Run Parallel Lint | ||
| run: parallel-lint . |
There was a problem hiding this comment.
We already have a reusable workflow for this: https://github.com/inpsyde/reusable-workflows/blob/main/.github/workflows/lint-php.yml
There was a problem hiding this comment.
I think I put it here because the workflow cannot run on the extracted artifact. Though the new unified build may solve that.
4b2c3d7 to
a810bb3
Compare
Please check if the PR fulfills these requirements
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 thetranslators: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
phpcsand 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.