Development repository for the sc-foodcritic-rules cookbook
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.kitchen/logs Add Lockbot Jul 24, 2018
coverage
Gemfile.lock
README.md
rules.rb

README.md

Sous-Chefs Foodcritic Rules

Here lie foodcritic rules to keep Sous-Chefs cookbooks similar.

Usage

The simplest thing that could possibly work:

git submodule add https://github.com/sous-chefs/sc-foodcritic-rules.git foodcritic/sc
foodcritic -I foodcritic/sc .

For more standard usage you'll want to install these rules as a Rake task.

Inside the cookbook repository, install the rules as a git submodule into foodcritic/sc:

git submodule add https://github.com/sous-chefs/sc-foodcritic-rules.git foodcritic/sc

Then in the Rakefile, ensure the include_rules option is set to include foodcritic/sc:

require 'foodcritic'

desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
  t.options = {
    include_rules: 'foodcritic/sc',
    fail_tags: ['any'],
    progress: true,
  }
end

Finally, verify that the rules are in affect by running:

rake style:chef