BestPracticeProject

A bundle of various coverage and analytical tools to help you keep your code clean. The idea is that you only have to bundle this project, run the generate config command and start writing clean code for your project.

In development!

This project is still in early development. Currently generating configs only works for Rubocop and SCSS Lint.

Install

Add to your Gemfile and bundle:

gem "best_practice_project"

Also add the linters and cops that you wish to use. These are supported:

group :development do
  gem "rubocop", "~> 0.35.0", require: false
  gem "coffeelint", "~> 1.11.0", require: false
  gem "scss_lint", "~> 0.42.2", require: false
  gem "rails_best_practices", "~> 1.15.7", require: false
end

Add this to your Rakefile:

require "best_practice_project"
BestPracticeProject.load_tasks

Usage

First you can generate some todo configs like this:

bundle exec rake best_practice_project:generate_configs

You can then run all the checks like this:

bundle exec rake best_practice_project:run

You can also run each check manually like this:

bundle exec rake best_practice_project:run_rubocop
bundle exec rake best_practice_project:run_rails_best_practices
bundle exec rake best_practice_project:run_coffee_lint
bundle exec rake best_practice_project:run_scss_lint

Rubocop supports auto correct. Use it like this:

bundle exec rake best_practice_project:run_rubocop --auto-correct

Or:

bundle exec rake best_practice_project:run --auto-correct

Contributing to best_practice_project

Copyright © 2015 kaspernj. See LICENSE.txt for further details.