ruby-style
Installation
SKILL.md
Ruby style and idiom
Distilled from the Shopify Ruby Style Guide (a decade of practice, written to be RuboCop-enforceable), cross-checked against GitLab and Discourse conventions.
Resolve conflicts by precedence
Major guides contradict each other. When they do, this order wins:
- The project's own linter config (
.rubocop.ymland whatever it inherits). It is executable, it gates CI, and it is what the team actually agreed to. - The project's existing surrounding code. Match the file you are in.
- This guide, for anything the linter does not cover.
Do not "correct" a project to match a style guide. If the project uses single quotes
and disables frozen_string_literal, that is a decision someone made; changing it is
an unrelated diff that will fail their lint gate.