WordPress-Coding-Standards/Tests/RulesetCheck
jrfnl 92751a146a
Extra: do not allow ambiguous conditions
This new PHPCS 3.9.0 sniff will flag code which contains a `||` and a `&&` operator in the same condition and their precedence is not clarified via parenthesis.

This should allow for users of WPCS to find/prevent some bugs in code.

I'd personally would **_highly_** recommend for WP Core to also use this sniff, but I suspect that will need due discussion/Make post/handbook change.

Note: running this sniff on WP Core as-is, would (to my surprise) not actually trigger any new errors.

Includes updating a code snippet in the Ruleset test to comply.
2024-03-04 16:30:23 +01:00
..
class-ruleset-test.inc Extra: do not allow ambiguous conditions 2024-03-04 16:30:23 +01:00
example-ruleset-test.inc GH Actions: add task to test example ruleset 2023-09-03 15:56:56 +02:00