acrmp/foodcritic — pull request #272 by chazzly (2014-10-20 22:48:53+00:00)
Title: Added default locations for additional rules files

Two additions to make inclusion of custom / extra rules easier. Searches the following locations for rules.
- ~/.chef/foodcritic/rules.rb
- ~/.chef/foodcritic/rules/*.rb

I would also like to add rules from the /config directory, but could not find a good way to reference the chef repo directory from within load_rules!. This would make enforcing the same rules across a group of users easier, as ~/.chef is probably not shared, but /config probably is.

Looking at this, along with my other pull request (#229 update linter.rb (horribly named, sorry)), I'm wondering what your thoughts are on creating a base config file / directory that could be customized with standard options and locations to load additional rule & tag files. We use foodcritic on every cookbook, but find ourselves using the same command line options every time (-I , -X , and occasionally --context)

Unless I'm blind and missing something, there isn't a way to set these permanently, so we can avoid the long command line each time (perhaps this should be a separate issue).

Thanks