I had several problem trying to install CodeSniffer and make it run with Eclipse properly.
That was the steps I followed to made it run properly, you will find on this post detailed instructions about how to configure, How to Eclipse + CodeSniffer + CakePHP Sniff.
Go to the preferences menu on Eclipse
and navigate to...
PHP -> PHP Executables -> Add...
(source: zot24.com)
Once we have PHP configured on our Eclipse we have to setup PEAR
go to...
PHP Tools -> Library -> PEAR -> New...
And select the path
where php55
was installed using homebrew
, you can run this command to know the path of php55
brew --prefix php55
Then just add at the end of that command
.../lib/PHP
(source: zot24.com)
And the last step is select our just configured PEAR
path a the default library used by our PHP CodeSniffer
, as you can see on the imagen below:
(source: zot24.com)
And done! just enjoy a code clean! :)
(source: zot24.com)