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

Fix an incorrect auto-correct for Layout/ClassStructure #8907

Commits on Oct 19, 2020

  1. Fix an incorrect auto-correct for Layout/ClassStructure

    This PR fixes the following incorrect auto-correct for `Layout/ClassStructure`
    when heredoc constant is defined after public method.
    
    ```console
    % cat example.rb
    class Foo
      def foo
      end
    
      CONSTANT = <<~EOS.freeze
        str
      EOS
    end
    
    % bundle exec rubocop --only Layout/ClassStructure -a
    (snip)
    
    % cat example.rb
    class Foo
      CONSTANT = <<~EOS.freeze
      def foo
      end
    
        str
      EOS
    end
    ```
    koic committed Oct 19, 2020
    Copy the full SHA
    af6b974 View commit details
    Browse the repository at this point in the history