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

Semicolon removal in Style/TrailingBodyOnMethodDefinition autocorrection #5334

Closed
garettarrowood opened this issue Dec 27, 2017 · 0 comments · Fixed by #5335
Closed

Semicolon removal in Style/TrailingBodyOnMethodDefinition autocorrection #5334

garettarrowood opened this issue Dec 27, 2017 · 0 comments · Fixed by #5335

Comments

@garettarrowood
Copy link
Contributor

Expected behavior

Successfully autocorrects trailing body offenses that do not start on the first line of a file.

This:

foo

def some_method; body
end

should become:

foo

def some_method
  body
end

Actual behavior

The semicolon is not removed, and the offense autocorrects to:

foo

def some_method;
  body
end

Steps to reproduce the problem

See above.

RuboCop version

$ rubocop -V
0.52.1 (using Parser 2.4.0.2, running on ruby 2.4.3 x86_64-linux)
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

Successfully merging a pull request may close this issue.

1 participant