-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--exclude sniffs fails in some cases #1619
Comments
Put this in your ruleset to turn that error off: <rule ref="Internal.NoCodeFound">
<severity>0</severity>
</rule> |
Ah... So the --exclude=... option doesn't work. Let me know if rulesets can be chained... In other words, rather than hacking an existing ruleset, can I create an additional ruleset which inherits from other rulesets, so future git pull invocations don't obliterate ruleset hacks. Thanks. |
Ruleset mod above works like a champ. Thanks. Looks like PHP_CodeSniffer.git/src/Standards/PSR2 contains an example of chaining to PSR1, so I can likely figure out how. Point me to the docs about this, if they exist. Thanks. |
The ruleset.xml options are documented here: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml |
I have a client with many .html files. Some contain PHP (shudder) + some are plain HTML.
My goal is to ignore the Internal.NoCodeFound sniff to prune 1000s of related messages from the output.
Let me know if there's a way to do this.
Thanks.
Problem #1 - the NoCodeFound sniff seems to live outside ruleset.xml, so fails to show up as being registered.
Problem #2 - usage message for --sniffs + --exclude are poorly documented, so I can only guess at correct syntax.
Be great to add Usage examples for both --sniffs + --exclude + their usage together, if they effect each other.
Using --exclude=Internal.NoCodeFound kills phpcs.
Problem #3 - Pre-pending with any of the installed coding standards has no effect.
Problem #4 - Pre-pending with bogus coding standard name has no effect.
The text was updated successfully, but these errors were encountered: