bpearson / atom-phpcs

PHP CodeSniffer package for Atom editor
MIT License
6 stars 1 forks source link

Provide support for defining ruleset filepath #27

Closed mikeerickson closed 7 years ago

mikeerickson commented 7 years ago

Hey Gang

Just started with this plugin and all is working now (as expected).

But I wasted a good hour trying to debug this why it wouldn't work out of the box

In short, our ruleset name was phpcs-ruleset.xml (see hyphen) The plugin is searching for phpcs.ruleset.xml

So, while it was an easy fix on our end to rename ruleset, we have a large organization of folks who use this company ruleset. Most of the team uses PHPStorm, where you can provide a direct path to .xml file.

In short, if I had a way to supply path to ruleset, we don't have to change anything in our repos and we wont get out of sync on changes to ruleset etc.

bpearson commented 7 years ago

I have tried a custom ruleset by adding the full path in the standard setting in preferences, and it worked for me.

mikeerickson commented 7 years ago

Hmm, I looked all over settings and only thing I saw regarding ruleset was the checkbox which stated it would search for results

I will have a look again tomorrow when I return to work where I use plugin

bpearson commented 7 years ago

Hmm? bit puzzled by what you are seeing... I get this... screenshot_2016-12-20_11-51-18 And put the full path in the "Standard"

mikeerickson commented 7 years ago

Ah, didn't think about using the standard property, but I do see that. I will try It out in the morning

mikeerickson commented 7 years ago

OK, all is good. I have put the name of our desired ruleset into this property and all is good.