Information Technology Reference
In-Depth Information
provide a
README
file in markdown format because Chef Supermarket expects your cook-
books to have documentation in a
README.md
file.
Figure 16-16. FC011: Missing README in markdown
Ideally, you would fix this issue by writing some great documentation, but for now, just
move the
README.md
boilerplate back to its original name:
$
mv README.md.old README.md
Run Foodcritic again, and it should report that
FC011
is no longer an issue:
$
foodcritic .
Performing these Foodcritic checks should be a regular part of your Chef cookbook develop-
ment cycle. The
Foodcritic documentation
has more information on how to integrate Food-
critic with various build tools.
You can even use Foodcritic with many popular text editors, so it can perform Foodcritic
runs while you type or when you save your Chef code.
You can create your own custom rules to extend the checks performed by Foodcritic. Etsy
has published its
set of custom Foodcritic rules
online. You can use its custom rules as an ex-
ample of how you can write rules more relevant to your environment.
Not all Foodcritic rules are trivial checks to see if you filled in the
metadata.rb
file or
provided documentation. The Etsy custom Foodcritic rules, for example, check for issues