Fixes the main.yml GitHub workflow to automatically run WPCS on every pull and commit on every branch. It was set up to only work on trunk, which doesn't exist on this repo.
Changes the PHPCS config to allow 8 files to be checked simultaneously.
Removes the /tests/ folder from .gitignore (not sure why it was there).
And then it fixes a metric ton of WPCS warnings and errors. Most of these were auto-fixed. However, all the renamed $array, $echo, $return, $string, and $require_once variables were not. I did those manually and tried to rename them properly.
[!NOTE]
I would highly suggest turning on the WordPress-Extra ruleset too. However, doing so throws a ton of errors right now, as there's a lot of stuff happening without nonces. To add it, code like this should be added to phpcs.xml.dist.
This pull:
main.yml
GitHub workflow to automatically run WPCS on every pull and commit on every branch. It was set up to only work ontrunk
, which doesn't exist on this repo./tests/
folder from.gitignore
(not sure why it was there).And then it fixes a metric ton of WPCS warnings and errors. Most of these were auto-fixed. However, all the renamed
$array
,$echo
,$return
,$string
, and$require_once
variables were not. I did those manually and tried to rename them properly.