Skip to content

Comments

Add guideline for minimizing negations in conditionals#975

Open
ydakuka wants to merge 1 commit intorubocop:masterfrom
ydakuka:minimize-negations-in-conditionals
Open

Add guideline for minimizing negations in conditionals#975
ydakuka wants to merge 1 commit intorubocop:masterfrom
ydakuka:minimize-negations-in-conditionals

Conversation

@ydakuka
Copy link
Contributor

@ydakuka ydakuka commented Feb 15, 2026

Recommend preferring the conditional form (if/unless) that results in fewer negations. When negated terms outnumber positive terms, flip the keyword and invert the condition.

Related: rubocop/rubocop#14824

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant