All Projects → rubocop → Rubocop Rails

rubocop / Rubocop Rails

Licence: mit
A RuboCop extension focused on enforcing Rails best practices and coding conventions.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rubocop Rails

Rubocop Performance
An extension of RuboCop focused on code performance checks.
Stars: ✭ 340 (-21.48%)
Mutual labels:  linter, rubocop, static-code-analysis
Rubocop
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Stars: ✭ 11,593 (+2577.37%)
Mutual labels:  linter, rubocop, static-code-analysis
Rubocop Packaging
A RuboCop extension focused on enforcing upstream best practices and coding conventions.
Stars: ✭ 29 (-93.3%)
Mutual labels:  linter, rubocop, static-code-analysis
rubocop-graphql
Rubocop extension for enforcing graphql-ruby best practices
Stars: ✭ 143 (-66.97%)
Mutual labels:  rubocop, static-code-analysis, linter
static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (-91.69%)
Mutual labels:  static-code-analysis, linter
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (-80.14%)
Mutual labels:  static-code-analysis, linter
Android-CICD
This repo demonstrates how to work on CI/CD for Mobile Apps 📱 using Github Actions 💊 + Firebase Distribution 🎉
Stars: ✭ 37 (-91.45%)
Mutual labels:  static-code-analysis, linter
Bandit
Bandit is a tool designed to find common security issues in Python code.
Stars: ✭ 3,763 (+769.05%)
Mutual labels:  linter, static-code-analysis
elm-review
Analyzes Elm projects, to help find mistakes before your users find them.
Stars: ✭ 195 (-54.97%)
Mutual labels:  static-code-analysis, linter
unimport
A linter, formatter for finding and removing unused import statements.
Stars: ✭ 119 (-72.52%)
Mutual labels:  static-code-analysis, linter
Eslint Config Standard React
ESLint Shareable Config for React/JSX support in JavaScript Standard Style
Stars: ✭ 416 (-3.93%)
Mutual labels:  linter, static-code-analysis
jetrockets-standard
Standard RuboCop configuration for JetRockets with cookies
Stars: ✭ 14 (-96.77%)
Mutual labels:  rubocop, linter
action-rubocop
Run rubocop with reviewdog 🐶
Stars: ✭ 83 (-80.83%)
Mutual labels:  rubocop, linter
standard-packages
List of packages that use `standard`
Stars: ✭ 32 (-92.61%)
Mutual labels:  static-code-analysis, linter
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (-80.14%)
Mutual labels:  rubocop, linter
Lint Review
An automated code linting bot that integrates various code lint tools with github pull requests.
Stars: ✭ 279 (-35.57%)
Mutual labels:  linter, rubocop
Pytype
A static type analyzer for Python code
Stars: ✭ 3,545 (+718.71%)
Mutual labels:  linter, static-code-analysis
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+948.73%)
Mutual labels:  linter, static-code-analysis
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+762.12%)
Mutual labels:  linter, static-code-analysis
standard-www
👆 Website for JavaScript Standard Style (@standard)
Stars: ✭ 28 (-93.53%)
Mutual labels:  static-code-analysis, linter

RuboCop Rails

Gem Version CircleCI

A RuboCop extension focused on enforcing Rails best practices and coding conventions.

Note: This repository manages rubocop-rails gem (>= 2.0.0). rubocop-rails gem (<= 1.5.0) has been renamed to rubocop-rails_config gem.

Installation

Just install the rubocop-rails gem

gem install rubocop-rails

or if you use bundler put this in your Gemfile

gem 'rubocop-rails', require: false

Usage

You need to tell RuboCop to load the Rails extension. There are three ways to do this:

RuboCop configuration file

Put this into your .rubocop.yml.

require: rubocop-rails

Alternatively, use the following array notation when specifying multiple extensions.

require:
  - rubocop-other-extension
  - rubocop-rails

Now you can run rubocop and it will automatically load the RuboCop Rails cops together with the standard cops.

Command line

rubocop --require rubocop-rails

Note: --rails option is required while rubocop command supports --rails option.

Rake task

RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-rails'
end

The Cops

All cops are located under lib/rubocop/cop/rails, and contain examples/documentation.

In your .rubocop.yml, you may treat the Rails cops just like any other cop. For example:

Rails/FindBy:
  Exclude:
    - lib/example.rb

Documentation

You can read a lot more about RuboCop Rails in its official docs.

Compatibility

Rails cops support the following versions:

  • Rails 4.2+

Readme Badge

If you use RuboCop Rails in your project, you can include one of these badges in your readme to let people know that your code is written following the community Rails Style Guide.

Rails Style Guide

Rails Style Guide

Here are the Markdown snippets for the two badges:

[![Rails Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop-rails)

[![Rails Style Guide](https://img.shields.io/badge/code_style-community-brightgreen.svg)](https://rails.rubystyle.guide)

Contributing

Checkout the contribution guidelines.

License

rubocop-rails is MIT licensed. See the accompanying file for the full text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].