bbatsov/rubocop — pull request #1463 by jcarbo (2014-11-25 16:23:59+00:00)
Title: Add EmptyLinesAroundBlockBody cop

There were a few existing cops for preventing/enforcing newlines
around the body of classes, methods, and modules. There wasn't one
for blocks (especially relevant for rspec!) so I added one. It uses the
same `EmptyLinesAroundBody` mixin as the others and I tried to write it
as similar to those cops as possible.

@jonas054 @bbatsov - I have this enabled by default, which causes the build to fail at the following spots due to discovered offenses:
* [/lib/rubocop/rake_task.rb:78](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/lib/rubocop/rake_task.rb#L78)
* [/spec/rubocop/cli_spec.rb:1389](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cli_spec.rb#L1389)
* [/spec/rubocop/cli_spec.rb:1762](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cli_spec.rb#L1762)
* [/spec/rubocop/cop/lint/assignment_in_condition_spec.rb:93](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cop/lint/assignment_in_condition_spec.rb#L93)
* [/spec/rubocop/cop/lint/useless_assignment_spec.rb:1614](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cop/lint/useless_assignment_spec.rb#L1614)
* [/spec/rubocop/cop/lint/void_spec.rb:64](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cop/lint/void_spec.rb#L64)
* [/spec/rubocop/cop/style/documentation_spec.rb:6](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cop/style/documentation_spec.rb#L6)
* [/spec/rubocop/cop/style/signal_exception_spec.rb:234](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/cop/style/signal_exception_spec.rb#L234)
* [/spec/rubocop/formatter/offense_count_formatter_spec.rb:73](https://github.com/bbatsov/rubocop/tree/670c4b3d4a/spec/rubocop/formatter/offense_count_formatter_spec.rb#L73)

Let me know how to proceed (i.e. Should I fix them? If so, in a separate commit or same commit? If not, should I disable by default?).