Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should Style/BlockDelimiters auto-correct introduce whitespace after do? #3247

Closed
Aqualon opened this issue Jun 27, 2016 · 0 comments
Closed

Comments

@Aqualon
Copy link
Contributor

Aqualon commented Jun 27, 2016

Given code like this:

foo.detect {|f|
  FOO.include? f
}

The autocorrect of Style/BlockDelimiters cop creates

foo.detect do|f|
  FOO.include? f
end

which is then criticized by Style/SpaceAroundKeyword

foo.rb:1:12: C: Style/SpaceAroundKeyword: Space after keyword do is missing. 
foo.detect do|f|
           ^^

Is this expected behavior that one cop auto-corrects to a state another cop complains about or should Style/BlockDelimiters auto-correct to code that adheres to the default rubocop style, i.e. introducing a space after the do?

$ rubocop -v
0.41.1

Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant