talira

RuboCop Rails

RuboCop extension with cops for Rails best practices and conventions

open sourceMITfree

RuboCop Rails adds Rails-specific analysis to RuboCop, the Ruby linter: a set of cops that enforce Ruby on Rails best practices and coding conventions. You install the rubocop-rails gem and load it as a plugin in your .rubocop.yml, and RuboCop then reports its offences alongside its own. Gem versions up to 1.5.0 were a different project, since renamed rubocop-rails_config.

Problems it solves

  • enforce Rails conventions across our app's code in CI
  • catch Rails anti-patterns in code review automatically
  • lint a Rails codebase for deprecated or risky ActiveRecord usage

Features

  • Rails-specific cops for best practices and conventions
  • loads as a RuboCop plugin from .rubocop.yml

Alternatives

The same job

These do what RuboCop Rails does.

  1. RuboCop Performance Performance optimization analysis for Ruby code, as a RuboCop extension
  2. RuboCop A Ruby static code analyzer and formatter, based on the community Ruby style guide.
  3. Checkstyle Checks Java source code against configurable coding-standard rules
  4. ESLint Find and fix problems in your JavaScript code.
  5. TFLint A Pluggable Terraform Linter
  6. Standard Ruby Unconfigurable Ruby linter and formatter built on RuboCop

Compare RuboCop Rails with the top 3