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

Style/TrailingComma remove comma in quotes in end of comment #1793

Closed
ShockwaveNN opened this issue Apr 14, 2015 · 0 comments
Closed

Style/TrailingComma remove comma in quotes in end of comment #1793

ShockwaveNN opened this issue Apr 14, 2015 · 0 comments
Assignees
Labels

Comments

@ShockwaveNN
Copy link
Contributor

Create file test.rb with content:

{ 
  foo: 'foo',
  bar: 'bar'.delete(',') #  ','
}

Run rubocop rubocop -aD test.rb with auto-fixes enabled
After autofixes we loose comma in quotes in comment:

{
  foo: 'foo',
  bar: 'bar'.delete(',') #  ''
}
rubocop -V
0.30.0 (using Parser 2.2.0.3, running on ruby 2.1.5 x86_64-linux)
@jonas054 jonas054 self-assigned this Apr 14, 2015
@jonas054 jonas054 added the bug label Apr 14, 2015
bbatsov added a commit that referenced this issue Apr 14, 2015
[Fix #1793] Check in TrailingComma if found comma is in a comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants