You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lint/Void leaves expressions like (1 + 1) alone because they are wrapped in brackets.
I tried fixing this myself but it is too complex for me.
Steps to reproduce the problem
Testcase:
it"registers an offense for void op #{op} if used in brackets"doexpect_offense(<<~RUBY,op: op) (a %{op} b) ^{op} Operator `#{op}` used in void context. ((a %{op} b)) ^{op} Operator `#{op}` used in void context. (((a %{op} b))) RUBY# Rest handled by Style/RedundantParentheses and Layout/IndentationConsistency# Though it would look better here if brackets are removed directlyexpect_correction(<<~RUBY) (a b) ((a b)) (((a %{op} b))) # or maybe just `à %{op} b`? Either way, shouldn't be autocorrected like the others RUBYend
Lint/Void leaves expressions like
(1 + 1)
alone because they are wrapped in brackets.I tried fixing this myself but it is too complex for me.
Steps to reproduce the problem
Testcase:
RuboCop version
The text was updated successfully, but these errors were encountered: