I'm playing around with Rubocop and there are some conventions I use that I'd prefer over the standard Rubocop follow. Consider the following:
if some_variable and another
do_this
end
Rubocop complains that I should be using &&
instead of and
here. I checked the documentation and the default setting for Style/AndOr
is always
. However, it does have setting (conditionals
) that allows me to do this:
model.save! and return
...but I'd rather just turn this standard completely off for my Rails project. Rubocop does let me do this per instance like this:
# rubocop:disable Style/AndOr
if check_this and check_that
# rubocop:enable Style/AndOr
do_something
end
...but that seems really tedious so I'd prefer it if I could disable Style/AndOr
altogether. Is this possible and if so how would I go about doing this?