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

Issue with AlignHash #782

Closed
tmornini opened this issue Jan 31, 2014 · 1 comment
Closed

Issue with AlignHash #782

tmornini opened this issue Jan 31, 2014 · 1 comment
Assignees
Labels

Comments

@tmornini
Copy link

Hello! Let me start by saying THANK YOU for rubocop. So damn cool!

I'm using:

 AlignHash:
   Enabled: true
   EnforcedColonStyle: table

With this code:

  def self.scenarios_order
    [
      { before:   %w( l k ) },
      { ending:   %w( m l ) },
      { starting: %w( m n ) },
      { after:    %w( n o ) }
    ]
  end

I'm seeing this:

C: Align the elements of a hash literal if they span more than one line.
          { before:   %w( l k ) },
            ^^^^^^^^^^^^^^^^^^^

I don't see any hash literals that span more than one line, nor do I see any misalignment. :-)

@bbatsov
Copy link
Collaborator

bbatsov commented Feb 1, 2014

Yep, that's definitely a bug.

@ghost ghost assigned jonas054 Feb 1, 2014
bbatsov added a commit that referenced this issue Feb 2, 2014
[Fix #782] Fix false positive in AlignHash for single line hashes
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

3 participants