bbatsov/rubocop — pull request #310 by edzhelyov (2013-06-28 16:21:27+00:00)
Title: Add checks for end alignment of blocks

This is my first attempt for contribution here and my understanding of the code is still incomplete.

I decided to remove the pending spec about blocks in the EndAlignment class. I've added checks for the cases
where we use the block's return value in assignments.

There are still some things that I want to discuss here before proceeding.

* Please, check the spec descriptions and tell me how to improve them. I'm not perfectly happy with their current state.
* In order to implement this I have to keep state for the duration of the current #inspect call. Maybe we can implement a more generic way for Cops to define their temporary storage that will later be cleared. I don't think we can do that in the #inspect method as some Cops are redefining it completely.
* Add configuration to the cop that will determine the block alignment schema. I can think of two cases:
1. Align with the start of the expression.
2. Align with the start of the block definition.

I think it's better to have something like ```EndAlignment.config['AlignSchema'] = :startOfBlock or :startOfAssignment```, instead of ```config['StartOfBlock'] = true```
What do you think ?