1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

Disable RuboCop check for conditional assignment

It is not universally useful to enfore a single assignment mode. With
short conditionals (or even a ternary operator), an assignment of the
returned value is common. For longer or more complex conditionals, I
perfer an assignment inside the condition to decouple the conditional
checks from the assignment logic.
This commit is contained in:
Holger Just 2017-08-05 18:44:47 +02:00
parent 8c7900f17b
commit ce9cc0f8b4

View File

@ -51,6 +51,12 @@ Style/Copyright:
Style/CaseEquality:
Enabled: false
# Both styles (i.e. assigning the return falue of a conditional once or
# assigning explicitly inside the conditional) have their place, dependent on
# the complexity. Enforcing a single style doesn't make the code any clearer.
Style/ConditionalAssignment:
Enabled: false
# Double negation is fine to reliably produce a Boolean from any value.
Style/DoubleNegation:
Enabled: false