A GitHub Action that runs the WP.org Code Analysis Tool on your plugin or theme.
The (experimental) WP.org Code Analysis Tool includes, at its core, a PHPCS ruleset that can be run on WordPress plugins or themes to validate whether the code should be accepted into the WordPress.org repository. However, the ruleset cannot simply be installed and added as a PHPCS standard because it was never built as a standalone standard. This GitHub Action installs the WP.org Code Analysis Tool and its dependencies, then simply runs the PHPCS checks with the appropriate ruleset on your plugin or theme.
If you have a plugin or theme in the WordPress.org repository, you can add this to your build pipeline to validate your plugin or theme before cutting a release and deploying the update to WP.org. This can be used alongside and independent of any other PHPCS or code quality checks you may already have in place.
Required The type of code to scan. Either plugin
or theme
.
uses: pantheon-systems/action-wporg-validator@v1
with:
type: 'plugin'
If you want to show that you're using the tool in your README files, you can use the following markdown:
[![WP.org Plugin Validator](https://img.shields.io/github/actions/workflow/status/<your-github-user>/<your-plugin-repository>/<your-workflow>.yml?label=plugin%20validator&logo=wordpress)](https://github.com/<your-github-user>/<your-plugin-repository>/actions)
[![WP.org Theme Validator](https://img.shields.io/github/actions/workflow/status/<your-github-user>/<your-theme-repository>/<your-workflow>.yml?label=theme%20validator&logo=wordpress)](https://github.com/<your-github-user>/<your-plugin-repository>/actions)