Giter VIP home page Giter VIP logo

chef-laughing-octo's Introduction

Chef Laughing ๐Ÿ™

Chef laughing octo laughs at your code when you dont pass its checkstyle , lint and spec criteria.

We have used out of the box hooks for pre-commit for developement and are taken from Pre-commits

How to use this in your Chef git repo ?

Install Dependencies

We use python module to run the 3 exectutables from OS (foodcritic, cookstyle, rspec) you can use any one or all as you want so you can skip un wanted deps. Make sure you have installed

  1. foodcritic: gem install foodcritic See also http://www.foodcritic.io/
  2. cookstyle: gem install cookstyle requires Ruby >= 2.4. See also https://docs.chef.io/cookstyle.html
  3. rspec: gem install rspec See also http://www.foodcritic.io/
  4. pre-commit: pip install pre-commit this is needed so that our pre-commits work.

Usage

  1. Create a file .pre-commit-config.yaml in your root folder of repo (where you have .git)
  2. Add this to your .pre-commit-config.yaml
repos:
-  repo: https://github.com/grizzly-monkey/chef-laughing-octo.git
   sha: ''   # Use the sha you want to point at release tag or a commit
   hooks:
    - id: check-foodcritic   # if you want to run foodcritic for cookbooks in repo
    - id: check-rspec      # if you want to run rspec for recipies in the repo
    - id: check-cookstyle  # if you want to run cookstyle for cookbooks in repo

Hooks are available in chef-pre-commit-hooks folder

  • check-rspec
  • check-foodcritic
  • check-cookstyle

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.