Skip to content

Conversation

@dblandin
Copy link
Contributor

This rule should remove the need for "don't align tokens" comments in PRs. I've run into this coming from an organization that preferred token alignment.

# bad something = 1 another = 2 # good something = 1 another = 2
```ruby # bad something = 1 another = 2 # good something = 1 another = 2 ```
@gdiggs
Copy link
Contributor

gdiggs commented Mar 11, 2016

Hmmm the tricky thing is that we align tokens when it's part of a list of already aligned tokens:

 something = 1 + new = 3 another = 2

I'd be happy to stop doing that though if others agree

@dblandin
Copy link
Contributor Author

In that case, would it make sense to change the list to remove the alignment? We could also remove the token alignment as part of the rubocop config update for specific repos.

@gdiggs
Copy link
Contributor

gdiggs commented Mar 11, 2016

Yeah I'd be cool with removing the token alignment. You might also be able to auto-correct them when you update the rubocop.yml, which would make my point moot.

@dblandin
Copy link
Contributor Author

You might also be able to auto-correct them

Good point. I think this is a violation that rubocop can autocorrect 👍

@pbrisbin
Copy link
Contributor

Nice.

@gdiggs
Copy link
Contributor

gdiggs commented Mar 11, 2016

👍

dblandin added a commit that referenced this pull request Mar 11, 2016
Disallow extra spacing for token alignment
@dblandin dblandin merged commit cb361e0 into master Mar 11, 2016
@dblandin dblandin deleted the devon/disallow-token-alignment branch March 11, 2016 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants