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(foo(bar, 'ExpiresAt' => {'Hours' => 60 * 60 * 24} # 24h )) end end
Not to generate invalid ruby code
Invalid ruby code is created due to the comment handling of # 24 h
# 24 h
# frozen_string_literal: true class Bar def initialize(*args); end end class Foo < Bar def initialize super(foo(bar, 'ExpiresAt' => { 'Hours' => 60 * 60 * 24 }) # 24h) 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:
Had a quick look at this, running autocorrect with only the Layout/MultilineMethodCallBraceLayout Cop produces this error.
Layout/MultilineMethodCallBraceLayout
Sorry, something went wrong.
I'd like to help out on this project. Mind if I take a crack at this issue?
Fix rubocop#7777 rubocop#7776 generate valid code if comment exists b…
6021b51
…efore closing brace
9a2cbf4
No branches or pull requests
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 the comment handling of
# 24 h
Steps to reproduce the problem
RuboCop version
The text was updated successfully, but these errors were encountered: