I'm trying to write an custom ruleset.xml for php code sniffer but calling it from the commandline without putting it in the default folder doesn't seem to work.
Since the documentations seems to state otherwise i'd like to ask if i'm doing something wrong here
:~/$ phpcs --standard=/home/edo/custom_ruleset.xml source/
===>
ERROR: the "/home/edo/custom_ruleset.xml" coding standard is not installed.
The installed coding standards are PEAR, PHPCS, Zend, Squiz and MySource
If that doesn't work: Any suggestions on how to ship your own coding standard with your source ? Thanks
You need at least version 1.3.0a1 of Code Sniffer to use annotated rulesets:
- All CodingStandard.php files have been replaced by ruleset.xml files
Custom standards will need to be converted over to this new format to continue working- You can specify a path to your own custom ruleset.xml file by using the
--standard
command line arg e.g.,phpcs --standard=/path/to/my/ruleset.xml
Before that, you had to copy your ruleset, as explained in this tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With