百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rubocop-rails-omakase

> 编程语言
开源

Omakase Ruby 样式化 Rails

557 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Omakase Ruby 样式化 Rails

Omakase Ruby styling for Rails

Ruby is a beautifully expressive language that not only tolerates many different dialects, but celebrates their diversity. It was never meant as a language to be written exclusively in a single style across all libraries, frameworks, or applications. If you or your team has developed a particular house style that brings you joy, you should cherish that.

This collection of RuboCop styles is for those who haven't committed to any specific dialect already. Who would just like to have a reasonable starting point, and who will benefit from some default rules to at least start a consistent approach to Ruby styling.

These specific rules aren't right or wrong, but merely represent the idiosyncratic aesthetic sensibilities of Rails' creator. Use them whole, use them as a starting point, use them as inspiration, or however you see fit.

Installation

New Rails applications (Rails 7.2+) automatically include this omakase style. No installation is necessary.

For apps generated with older versions of Rails, you can add it yourself.

First add this to your Gemfile:

ruby
gem "rubocop-rails-omakase", require: false, group: [ :development ]

Then run bundle, then bundle binstubs rubocop.

Then add a default .rubocop.yml file in the root of your application with:

yaml
# Omakase Ruby styling for Rails
inherit_gem:
  rubocop-rails-omakase: rubocop.yml

# Your own specialized rules go here

Now you can run ./bin/rubocop to check for compliance and ./bin/rubocop -a to automatically fix violations.

Contributing

These omakase styles are not intended as an invitation to bikeshed code style preferences. If you disagree with some of the rules incorporated here, you should specialize them in your own application. If you disagree with most of the rules, you should just create your own style guide from scratch.

The only type of contributions that will be considered are those pertaining to bugs or obvious inconsistencies that remain in the spirit of the omakase collection.

License

This gem is released under the MIT License.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言