digisavvy / some-like-it-neat

A WordPress Theme Using _s, Bourbon + Neat and Theme Hook Alliance
GNU General Public License v2.0
276 stars 61 forks source link

Phpcs #28

Closed desaiuditd closed 9 years ago

desaiuditd commented 9 years ago

Hey @digisavvy,

I've added phpcs support in the theme. Please review it.

In order to do so, I had to fix few of the phpcs errors in the theme code. So I've done that as well. So in this PR code is clean according to WordPress-Core coding standards from WordPress-Coding-Standards

Let me know your thoughts on this.

desaiuditd commented 9 years ago

Also, let me know if any changes are required.

desaiuditd commented 9 years ago

Hi, Can I know by when this will be merged in master branch ?

digisavvy commented 9 years ago

I can't get phpcs installed: https://www.evernote.com/shard/s2/sh/5f37d8b7-80d8-4736-9499-cce76626cf85/74805563a881353cfb2b472f52ee163c - also, PHP Code Sniffer needs installing. Can you confirm these items are working properly and submit a new PR?

Much thanks.

desaiuditd commented 9 years ago

Did you try re-installing npm packages ? I did not face such issues.

What I did was as follows:

  1. add entry of gulp-phpcs in package.json of some-like-it-neat.
  2. Execute npm install. It installed all packages correctly.
  3. And then execute gulp.

Since I had already installed PHP Code Sniffer in my local, it gave output correctly. You will need to install PHP Code Sniffer explicitly. Because that is something I thought should be handled via Yeoman Generator on project initialization. So I've handled it there using composer. You can see here and here

digisavvy commented 9 years ago

Okay, my local gulp and node installs were at issue and I have resolved them. I did get phpcs installed and I believe it's all right. I pushed my updates to the development branch. Can you do a quick pull to verify? Also, how can I test that phpcs is working properly?

desaiuditd commented 9 years ago

Sure thing. I'll take a dry run.

You just execute gulp command. I've added phpcs task into watch. So it will scan for Code Sniffer errors.

You also might need to install WordPress Coding Standards with Code Sniffer

desaiuditd commented 9 years ago

I'm reviewing development branch for phpcs. I've few changes to make. I'll send another PR for that.