Closed mikaelz closed 7 years ago
You don't seem to have WordPress-Core
in your phpcs.xml
, so you're missing Sniffs from the WordPress.Whitespace
and Generic.Whitespace
categories, for example.
Note, that WordPress-Extra
does not include WordPress-Core
.
You're also excluding WordPress.WhiteSpace.ControlStructureSpacing
.
Thank you. Enabling WordPress.WhiteSpace.ControlStructureSpacing
solved the issue.
I wrote the xml based on the repo sample, https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/phpcs.xml.dist.sample#L33
Note, that WordPress-Extra does not include WordPress-Core
@GaryJones Eh... last time I checked, Extra
did include Core
: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Extra/ruleset.xml#L66
@mikaelz Ah, yes, excluding sniffs is always a choice, but can have unexpected side-effects if you do.
Glad this is solved now.
The take-away here may be that we should comment out the example exclusions in the sample file to avoid people blindly copying them over.
Eh... last time I checked, Extra did include Core
Well, that's buried!
With
phpcbf --standard=phpcs.xml phpcstest.php
some spaces are missingpastebin of phpcs.xml.
installed_paths
is at master 1f64b1a0b5b789822d0303436ee4e30e0135e4dcBefore:
After: