We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When formatting the following code, rubocop will generate invalid ruby:
class Bar def initialize(*args) end end class Foo < Bar def initialize super( 'firstKey' => [ 'value a', #description1 'value b' #description2 ], 'secondKey' => 'Bar' ) end end
Not to generate invalid ruby code
Invalid ruby code is created due to incorrectly handling the comment and placing a comma on the comment line:
class Bar def initialize(*args) end end class Foo < Bar def initialize super( 'firstKey' => ['value a', # description1 'value b'] # description2, 'secondKey' => 'Bar' ) end end
$ [bundle exec] rubocop -V 0.80.0 (using Parser 2.7.0.2, running on ruby 2.6.5 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
whoever works on #7776 should also work on this issue.
Sorry, something went wrong.
I am working on this issue.
Fix rubocop#7777 rubocop#7776 generate valid code if comment exists b…
6021b51
…efore closing brace
[Fix #7776] Generate valid code if comment exists before closing brace (
9a2cbf4
#8237) Also fixes #7777.
Successfully merging a pull request may close this issue.
When formatting the following code, rubocop will generate invalid ruby:
Expected behavior
Not to generate invalid ruby code
Actual behavior
Invalid ruby code is created due to incorrectly handling the comment and placing a comma on the comment line:
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: