Foodcritic

200

Language / Framework: Chef Cookbooks
Checks: 380
Categories: Style
Foodcritic Version: 8.1.0

Foodcritic is a helpful lint tool you can use to check your Chef cookbooks for common problems.

Enable the Engine

To enable Foodcritic analysis, add the following to your .codeclimate.yml configuration file:

plugins:
 foodcritic:
    enabled: true

More information about the CLI is available in the README here: https://github.com/codeclimate/codeclimate

Configure the Engine

This engine accepts tags and cookbook_paths in its configuration. Both values are optional:

plugins:
  foodcritic:
    enabled: true
    config:
      tags:
      - "~FC011"
      - "~FC033"
      cookbook_paths:
      - libraries/mysql.rb
      - libraries/docker.rb

NOTE: cookbook_paths, when defined, are passed directly to Foodcritic and any computed include_paths (which take into account your configured exclude_paths) are ignored.

Understand the Engine

Consult the official Foodcritic documentation for more information about Foodcritic.