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

Autocorrect for Layout/EndAlignment does not fix alignment of end of singleton class definition #11567

Closed
j-miyake opened this issue Feb 11, 2023 · 0 comments · Fixed by #11568

Comments

@j-miyake
Copy link
Contributor

Autocorrect for Layout/EndAlignment does not fix alignment of end of singleton class definition.

Expected behavior

class Foo
  class << self
    end
end

should be corrected into

class Foo
  class << self
  end
end

Actual behavior

No offense, no correction.

Steps to reproduce the problem

# test.rb
class Foo
  class << self
    end
end
rubocop --autocorrect --only 'Layout/EndAlignment' test.rb

RuboCop version

$ bundle exec rubocop -V
1.45.1 (using Parser 3.2.1.0, rubocop-ast 1.24.1, running on ruby 3.1.2) [arm64-darwin21]
  - rubocop-performance 1.16.0
  - rubocop-rake 0.6.0
  - rubocop-rspec 2.18.1
j-miyake added a commit to j-miyake/rubocop that referenced this issue Feb 12, 2023
koic added a commit that referenced this issue Feb 12, 2023
[Fix #11567] Fix `Layout/EndAlignment` false negative
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