Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using Wordpress sniffer in Sublime Text #29

Open
lamakun opened this issue Jun 5, 2013 · 1 comment
Open

Error using Wordpress sniffer in Sublime Text #29

lamakun opened this issue Jun 5, 2013 · 1 comment

Comments

@lamakun
Copy link

lamakun commented Jun 5, 2013

I have tried to use this sniffer in Sublime Text, through plugin PHP CodeSniffer plugin. I pasted the code in CodeSniffer/Standrads folder (where some other standrads have already been copied).

Then in plugin configuration I set "WordPress-Coding-Standards-master" as standard to be checked against. When executing itI get the error:

Fatal error: Cannot redeclare class WordPress_Sniffs_Arrays_ArrayDeclarationSniff in D:\Dropbox\apps\EasyPHP-5.3.5.0\php\PEAR\pear\PHP\CodeSniffer\Standards\WordPress-Coding-Standards-master\Sniffs\Arrays\ArrayDeclarationSniff.php on line 23

Apparently it gets the Wordpress Standard code, but for some reason it does not execute well. I know this might be related to the plugin, but just in case, does anybody know why it happens??

Thanks!!

@ghost ghost assigned arturkot Jun 5, 2013
@lamakun
Copy link
Author

lamakun commented Jun 5, 2013

Well, I just changed the name of the folder from "WordPress-Coding-Standards-master" to "Wordpress" and changed in PHP_CodeSniffer Sublime Text plugin and started working properly. Not sure this was the reason of the error but the point is it is now fine. Any reason or comment on that?

Thanks!!

Edit: Since it is working and I have found hundreds of error, I realize how useful a fixer would be (kind of http://cs.sensiolabs.org/ for PSR-1 and PSR-2). Is there anything like this for Wordpress standard? Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants