Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Development repository for the sc-foodcritic-rules cookbook

Notifications You must be signed in to change notification settings

Sous-Chefs-Boneyard/sc-foodcritic-rules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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