A RuboCop extension focused on enforcing Rails best practices and coding conventions. It’s based on the community-driven Rails style guide. You need to tell RuboCop to load the Rails extension. Now you can run rubocop and it will automatically load the RuboCop Rails cops together with the standard cops. If you are using Rails 6.1 or newer, add the following config.generators.after_generate setting to your config/application.rb to apply RuboCop autocorrection to code generated by bin/rails g. It uses rubocop -A to apply Style/FrozenStringLiteralComment and other unsafe autocorretion cops. rubocop -A is unsafe autocorrection, but code generated by default is simple and less likely to be incompatible with rubocop -A. If you have problems you can replace it with rubocop -a instead.

Features

  • A RuboCop extension
  • Supports Rails 4.2+
  • Focused on enforcing Rails best practices
  • Focused on enforcing coding conventions
  • It’s based on the community-driven Rails style guide
  • You need to tell RuboCop to load the Rails extension

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow RuboCop Rails

RuboCop Rails Web Site

Other Useful Business Software
Gemini 3 and 200+ AI Models on One Platform Icon
Gemini 3 and 200+ AI Models on One Platform

Access Google's best plus Claude, Llama, and Gemma. Fine-tune and deploy from one console.

Build generative AI apps with Vertex AI. Switch between models without switching platforms.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RuboCop Rails!

Additional Project Details

Programming Language

Ruby

Related Categories

Ruby Static Code Analysis Tool

Registered

2023-03-31