Closed nielslange closed 3 years ago
Due to various PRs I created in the previous days, I'd first address the open PRs and merge them, before refactoring the plugin. This allows to refactor the added functionality in one go.
This issue might be obsolete once #32 had been merged. 🤔
@trepmal Since you merged #32 yesterday, I checked out the most recent version of this plugin and run composer cs
receiving the following result:
$ composer cs
> @php ./vendor/bin/phpcs
E. 2 / 2 (100%)
FILE: tests/bootstrap.php
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | Missing file doc comment (Squiz.Commenting.FileComment.Missing)
3 | ERROR | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$_tests_dir". (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound)
5 | ERROR | Global variables defined by a theme/plugin should start with the theme/plugin prefix. Found: "$_tests_dir". (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound)
14 | ERROR | Functions declared in the global namespace by a theme/plugin should start with the theme/plugin prefix. Found: "_manually_load_plugin".
| | (WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound)
14 | ERROR | Missing doc comment for function _manually_load_plugin() (Squiz.Commenting.FunctionComment.Missing)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 633ms; Memory: 14MB
Script @php ./vendor/bin/phpcs handling the cs event returned with error code 1
I must have missed these errors when checking #32, and I wonder how you're checking the coding standards. Are you also running composer cs
on your end? Shall I go ahead and quickly address the open errors within tests/bootstrap.php?
You have found my secret, I've been skipping phpcs on the bootstraps in my recent updates :)
Yes, composer cs
is what I'm running. (This is notably commented out in the GitHub actions config right now, as it would be pretty noisy until issues get resolved).
You are welcome to address the errors.
Running
phpcs . --standard=WordPress --ignore="/vendor/*,/node_modules/*,/packages/*" --extensions=php -p
currently results to: