Closed digisavvy closed 9 years ago
This is the filter that I've put on phpcs.
phpcs --ignore='node_modules/*,vendor/*,*-min.css,assets/js/vendor/*,assets/bower_components/*,assets/css/*,*-min.js,assets/js/production.js' --standard='WordPress-Core' .
So basically, this will skip following folders/files and scan rest of all.
node_modules/*
: Skip everything under node_modules
folder. This is for npm.vendor/*
: Skip everything under vendor
folder. This is for composer.assets/bower_components/*
: Skip everything under bower_components. This is for bower.assets/css/*
: Skip all CSS files. Right now I put this because, gulp-sass
does not generate CSS according to WP standards. So I've skipped that for now. ( Mainly indentation issue. WordPress expects tabbed indentation. But gulp-sass generates CSS with spaced indenting. )*-min.js
: Skip all minified JS.assets/js/production.js
: Skip production.js
. This is because, production.js includes other third-party JS as well.I'm open to change this logic.
Also, in master branch there are a few conflicting files which are causing phpcs errors. I don't understand their purpose. I was not sure whether to keep them or not. Below:
assets/sass/index.php
assets/sass/layouts/index.php
/library/index.php
partials/index.php
page-templates/index.php
Why do we need an empty php file under these folders ?
Thanks so much. The files you noted are there as a "flimsy security" deterrent to keep people from directly accessing the directory.. I can remove them.
Okay, I've removed those files; Header.php is still throwing a few errors and I'm not sure how to resolve.
Also took your advice and consolidated branches down to master and development and used tags for all other release points
That's cool. :+1: I've pushed one commit. And phpcs log is clean now.
Please confirm. :smiley:
Boom! Looks good from here, too! Thanks. =)
Just need to verify we're looking at php files in root theme directory, page-templates and that's really it; I don't think we should be checking anything else.
Thoughts?