You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you put your custom standard in a directory called eg. php_coding_standard (which comes naturally because you probably already have node_modules and bower_components) you get silly sniff codes in your report (like php.standard.S.BraceOnSameLine in my case) which you cannot silence with
Warning: PHP Fatal error: Uncaught exception 'PHP_CodeSniffer_Exception' with message 'Referenced sniff "php.standard.S.BraceOnSameLine" does not exist' in /usr/share/php/PHP/CodeSniffer.php:1092
Stack trace:
Not sure if anything can be done about in 2.x version of PHP_CodeSniffer, because it uses _ in class names as directory separators in class autoloading. The 3.x version (not released) will use namespaces and that shouldn't be a problem.
What @aik099 said is exactly right. You'll need to conform to the directory structure PHPCS uses in version 2. Once I release version 3, you can call your standard and sniffs whatever you want because you'll need to be putting them into namespaces.
There is nothing I can do in version 2 to make this work, so I'll close this.
If you put your custom standard in a directory called eg. php_coding_standard (which comes naturally because you probably already have node_modules and bower_components) you get silly sniff codes in your report (like php.standard.S.BraceOnSameLine in my case) which you cannot silence with
see stack trace below.
If I name the directory "phpcs" all is well.
This restriction should at least be documented.
The text was updated successfully, but these errors were encountered: