carta
foodcritic(1)

foodcritic1

Lint tool for chef cookbooks

Usage

foodcritic [options ...] cookbook ...

foodcritic [options ...] --list

Overview

foodcritic makes it easier to flag problems in your Chef cookbooks that will cause Chef to blow up when you attempt to converge. This is about faster feedback.

Each cookbook path specified will be examined for common problems and poor style.

Options

-t, --tags TAGS

Only check against rules with the specified tags. Prefix tags with a tilde ~ to exclude rules.

-l, --list

Do not perform a lint check; instead simply list the rules that would be enabled based on the defaults and the rule selection options (-t, -I)

-f, --epic-fail TAGS

Exit non-zero if any of the specified tags are matched. Use the pseudo-tag any to fail if any tag is matched.

-c, --chef-version VERSION

Only check against rules valid for this version of Chef.

-B, --cookbook-path

Cookbook path(s) to check.

-C, --[no-]context

Show lines matched against rather than the default summary.

-E, --environment-path

Environment path(s) to check.

-I, --include PATH

Additional rule file path(s) to load.

-R, --role-path

Role path(s) to check.

-S, --search-grammar PATH

Specify grammar to use when validating search syntax. (Default: the grammar of any installed Chef)

-V, --version

Display the foodcritic version.

-X, --exclude PATH

Exclude path(s) from being linted.

Return values

By default, foodcritic will always return 0.

If --epic-fail is specified, then foodcritic will return 3 if any tags are matched.

History

  • Debian 9 (Stretch): the text shown here
  • Debian 8 (Jessie)

--list since Debian 9 (Stretch); -l since Debian 9 (Stretch).

From foodcritic 8.1.0-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.