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

Align hash special case #545

Merged
merged 2 commits into from
Oct 7, 2013
Merged

Conversation

jonas054
Copy link
Collaborator

@jonas054 jonas054 commented Oct 7, 2013

I noticed that a comma was missing in a spec example that was instroduced in #514. That syntax error was silently ignored and we missed the fact that we didn't support multi-values per line, multi-line hash syntax alignment of the table or separator kind.

There are 'accepts' examples where there's a syntax error in the inspected source, which means that the code is never actually inspected. The example passes, but we haven't checked anything.
Multiple key-value pairs per line in a multi-line hash was not supported correctly. Alignment can only be checked when each key/value is on a separate line, so we ignore these cases.
bbatsov added a commit that referenced this pull request Oct 7, 2013
@bbatsov bbatsov merged commit 1ef23d7 into rubocop:master Oct 7, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Oct 7, 2013

Nice catch.

@jonas054 jonas054 deleted the align_hash_special_case branch July 14, 2014 07:22
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 this pull request may close these issues.

2 participants