Skip to content

Use EnforcedStyle: always for Style/AndOr

Sean McGivern requested to merge use-andor-everywhere into master

The default for Style/AndOr is to complain on this:

if foo and bar

But not on things like this:

items.select { |item| item.foo and item.bar }

We don't have any failures with the stricter version in the Rails app right now, so it seems worthwhile to enable it everywhere.

Refs gitlab-org/gitlab!49771 (comment 464836814)

Edited by Peter Leitzen

Merge request reports