Writing solid Chef recipes can be quite challenging. There are a couple of pitfalls, which you can easily overlook. And writing cookbooks in a consistent style is even harder. You might wonder what the proven ways to write cookbooks are. Foodcritic tries to identify possible issues with the logic and style of your cookbooks.
In this section we'll learn how to use Foodcritic on some existing cookbooks.
foodcriticgem to your Gemfile:
mma@laptop:~/chef-repo $ subl Gemfile
source 'https://rubygems.org' gem 'foodcritic', '~>2.2.0'
mma@laptop:~/chef-repo $ bundle install
Fetching gem metadata from https://rubygems.org/ ...TRUNCATED OUTPUT... Installing ...