Giter VIP home page Giter VIP logo

foodcritic's Introduction

Foodcritic

Build Status Gem Version

Foodcritic is a code linting tool for writing better and safer Chef cookbooks that runs both as a command line tool and as a Rake task. Out of the box Foodcritic contains over 70 cookbook rules, and plugin system for writing your own rules.

Basic Usage

$ gem install foodcritic
$ foodcritic my_cookbook_dir

Documentation

The Foodcritic site at http://foodcritic.io/ contains documentation for each of the rules as well as documentation on the API for writing your own rules.

Requirements

  • Ruby 2.3+

Building Foodcritic

$ bundle install
$ bundle exec rake

Testing Foodcritic

Foodcritic includes rspec tests of the application itself and cucumber tests for each of the included rules. Each of these tests can be run via rake

Running rspec tests:

$ bundle exec rake spec

Running cucumber tests:

$ bundle exec rake features

Running regression tests:

$ bundle exec rake 'spec[regression]'

Docker

Foodcritic can also be used with Docker. To build and run Foodcritic in a Docker container please follow the instructions below.

Building the Docker image:

$ docker build --rm -t foodcritic/foodcritic .

Running Foodcritic inside a Docker container:

$ docker run -it --rm -v ~/cookbooks:/cookbooks foodcritic/foodcritic "/cookbooks"

Note: This will mount the host directory ~/cookbooks into the container in the path /cookbooks.

License

MIT - see the accompanying LICENSE file for details.

Changelog

To see what has changed in recent versions see the CHANGELOG. Foodcritic follows the Rubygems Semantic Versioning Policy.

Contributing

Additional rules and bug fixes are welcome! Please fork and submit a pull request on an individual branch per change.

foodcritic's People

Contributors

tas50 avatar lamont-granquist avatar coderanger avatar odcinek avatar jaymzh avatar damacus avatar stefanor avatar jaym avatar miguelcnf avatar juanje avatar hagihala avatar grosser avatar zts avatar sabat avatar miketheman avatar jkeiser avatar docwhat avatar cgriego avatar v-a avatar nvwls avatar thommay avatar sethvargo avatar rteabeault avatar aia avatar ayarmoluk17 avatar robbkidd avatar mlafeldt avatar richardc avatar chazzly avatar akihiro17 avatar

Watchers

Charles O. Mitchell avatar  avatar

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.