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
Layout/SpaceInsideArrayLiteralBrackets:
EnforcedStyle: space
And here's the code:
a = []
a[[ 1, 2 ]]
I expect this to pass. SpaceInsideArrayLiteralBrackets should be happy since there is a space inside the brackets. SpaceInsideReferenceBrackets should be happy since there are no spaces in between the [[ and ]]. It should complain if I were doing a[ [ 1, 2 ] ], but I'm not.
Actual behavior
When I use auto-correct, the two cops fight each other and create an infinite loop.
Steps to reproduce the problem
Create the files above as style.yml and a.rb, then run:
rubocop -c style.yml a.rb --auto-correct
RuboCop version
0.52.0 (using Parser 2.4.0.2, running on ruby 2.2.2 x86_64-linux)
The text was updated successfully, but these errors were encountered:
Expected behavior
Here's the configuration:
And here's the code:
I expect this to pass. SpaceInsideArrayLiteralBrackets should be happy since there is a space inside the brackets. SpaceInsideReferenceBrackets should be happy since there are no spaces in between the
[[
and]]
. It should complain if I were doinga[ [ 1, 2 ] ]
, but I'm not.Actual behavior
When I use auto-correct, the two cops fight each other and create an infinite loop.
Steps to reproduce the problem
Create the files above as
style.yml
anda.rb
, then run:RuboCop version
0.52.0 (using Parser 2.4.0.2, running on ruby 2.2.2 x86_64-linux)
The text was updated successfully, but these errors were encountered: