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
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
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