acrmp/foodcritic — pull request #78 by ketan (2012-10-02 08:21:51+00:00)
Title: Reduce unnecessary blank lines from console output if there's nothing to print

We run foodcritic tests for a lot of cookbooks:

```
Dir["cookbooks/*"].each do |cookbook_dir|
cookbook_name = File.basename(cookbook_dir)
FoodCritic::Rake::LintTask.new(cookbook_name) do |t|
t.files = cookbook_dir
t.options = ...
end
```

This outputs one line of console output for each task that is defined. Even if there's nothing to warn the user about.

This patch ensures that we only print the food critic reviews if there's a warning and fail with a proper message if there's any, thereby preventing a blank line from being printed.