customink-webops/foodcritic-rules — pull request #2 by JeanMertz (2013-10-03 08:36:06+00:00)
Title: Only search valid cookbook directories

This helps with test/spec directories.

It's not the most elegant solution, but I found that using this `Rakefile`:

```
require 'foodcritic'
task default: [:foodcritic]
FoodCritic::Rake::LintTask.new do |t|
t.options = {
include_rules: ['test/foodcritic'],
exclude_paths: ['test', 'spec', 'features']
}
end
```

these custom rules aren't enforcing the `exclude_paths` setting. However, I couldn't find a way to access these paths in the custom rule, so I decided to use the provided `standard_cookbook_subdirs` method.

Ideally, this would also be fixed on Foodcritic's side, passing along the excluded paths.