Describe the bug
Excluding a rule/setting severity 0, should NOT load the rule, if it hasn't been loaded yet.
To reproduce
exclude any rule in any ruleset.
Run with "-vv"
and see
Processing rule "Foo.Bar"
=> /some/path/foo/bar.php
=> severity set to 0
Expected behavior
No processing of the rule.
Versions (please complete the following information)
PHP_CodeSniffer version 3.7.2 and before
Additional context
Just like phpcs-only/phpcbf-only="true" will not process the specified rule, excluding the rule shouldn't either.
This is important, because sometimes you want to use an external ruleset, where some rules don't work (loading them will throw PHP notices with your/newer PHP versions) or are slowing down phpcs a lot.
Currently the only way to do that is to copy the whole ruleset instead and not include those buggy rules, which creates bloated, hard to maintain code.
Please confirm:
Describe the bug
Excluding a rule/setting severity 0, should NOT load the rule, if it hasn't been loaded yet.
To reproduce
exclude any rule in any ruleset.
Run with "-vv"
and see
Expected behavior
No processing of the rule.
Versions (please complete the following information)
PHP_CodeSniffer version 3.7.2 and before
Additional context
Just like phpcs-only/phpcbf-only="true" will not process the specified rule, excluding the rule shouldn't either.
This is important, because sometimes you want to use an external ruleset, where some rules don't work (loading them will throw PHP notices with your/newer PHP versions) or are slowing down phpcs a lot.
Currently the only way to do that is to copy the whole ruleset instead and not include those buggy rules, which creates bloated, hard to maintain code.
Please confirm:
masterbranch of PHP_CodeSniffer.