The project is in a healthy, maintained state
A RuboCop plugin containing custom cops and configuration for Jeff's Ruby on Rails conventions.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

mecha_style-rails

Custom RuboCop plugin enforcing personal Ruby on Rails style and conventions.

Usage in a Rails App

Add the gem to your Rails application's Gemfile:

group :development, :test do
  gem "mecha_style-rails", github: "jefflunt/mecha_style-rails", require: false
end

Enable the plugin in .rubocop.yml:

plugins:
  - rubocop-rails
  - mecha_style-rails

Adding Custom Cops

  1. Create a cop class in lib/rubocop/cop/mecha_style_rails/<cop_name>.rb under RuboCop::Cop::MechaStyleRails (all files in that directory are auto-required).
  2. Add its default configuration entry in config/default.yml.
  3. Add specs in spec/rubocop/cop/mecha_style_rails/<cop_name>_spec.rb.

You can also place personal overrides for built-in Style/*, Layout/*, Lint/*, or Rails/* cops directly in config/default.yml.

Development

bin/setup
bundle exec rake        # runs RSpec and RuboCop
bundle exec rspec       # runs cop specs only
bundle exec rubocop     # lints this repository