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
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
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