Open ghost opened 3 years ago
This project is no longer maintained and doesn't support this feature.
As an explanation, PHPCS itself will go looking for a ruleset.xml file if asked to scan a file or directory, but this plugin sends the content as STDIN so it needs to specify a coding standard path for PHPCS to use.
There are other PHPCS plugins for Sublime that may support this feature, so it's probably worth having a look at what else is available.
Our team is currently in the process of trying to get codesniffer working in sublime.
So far we have been able to set it up and get it running as it should with the default properties.
However, due to our different codebases we ideally need to use a different ruleset per project.
Having looked at the PHP_CodeSniffer documentation it says that If you run PHP_CodeSniffer without specifying a coding standard, PHP_CodeSniffer will look in the current directory, and all parent directories, for a file called either .phpcs.xml, phpcs.xml, .phpcs.xml.dist, or phpcs.xml.dist
I've removed the
phpcs_standard
parameter from the PHP_CodeSniffer.sublime-settings file but it doesn't seem to be picking up my projectsphpcs.xml
file at all.Is there another setting I need to change somewhere to tell this plugin to use my projects
phpcs.xml
file?We have installed PHP_CodeSniffer globally via composer.
This is the current PHP_CodeSniffer.sublime-settings file:
This is what our custom ruleset looks like:
The ruleset seems to work fine in other editor plugins (i.e. linter-phpcs for Atom), so I'm fairly certain that I'm missing an important configuration setting in this plugin.