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

Lint/BlockAlignment gets it wrong for nested expressions #1614

Closed
zenspider opened this issue Jan 27, 2015 · 2 comments
Closed

Lint/BlockAlignment gets it wrong for nested expressions #1614

zenspider opened this issue Jan 27, 2015 · 2 comments

Comments

@zenspider
Copy link

  def get_gems_by_name
    @@by_name ||= Hash[*get_latest_gems.map { |gem|
                         [gem.name, gem, gem.full_name, gem]
                       }.flatten]
  end

The splat doesn't seem to matter to emacs nor to rubocop where each disagree on where the close brace should be.

@alexdowad
Copy link
Contributor

Opened a PR which fixes this. I'm also thinking about unary operators, like - and ~. How does this look:

a = ~method do |param|
      something
    end

As opposed to this:

a = ~method do |param|
       something
     end

@bbatsov
Copy link
Collaborator

bbatsov commented Dec 23, 2015

Sounds reasonable.

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

No branches or pull requests

3 participants