Adopt Shopify's Ruby style guide (rubocop-shopify) - #13
Merged
Conversation
Inherit rubocop-shopify's config (pinned ~> 2.18 while the gem still supports Ruby 3.2; >= 3.0 requires Ruby 3.3), bring the codebase clean with no rubocop_todo, and enforce it through a dev style command and a CI lint job. Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
The lockfile resolved rubocop's parallel dependency to 2.1.0, which requires Ruby >= 3.3 and broke bundle install on the 3.2 CI job. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rubocop-shopifyand a minimal.rubocop.ymlinheriting Shopify's config (SuggestExtensions: false;TargetRubyVersioninferred from the gemspec floor).~> 2.18: rubocop-shopify >= 3.0 requires Ruby >= 3.3, and main still supports 3.2. The~> 3.0bump rides along with Line-aligned emission: source-true backtraces and debuggers by construction #12, which raises our floor to 3.3. Style rules are essentially identical between the two (3.0 was the Ruby-floor/plugin-API major)..rubocop_todo.yml. Mostly safe autocorrect (string quotes, layout, call parens); a handful of hand fixes:extract_transformationde-duplicated across its identical branches,@@source_mapsto a class instance var, safe navigation inMixinUtils.try_super,class << selfinTransformationHelper.dev stylecommand and a CIlintjob (single Ruby 4.0, matching the local toolchain; cop behavior is pinned by the inferred target version, not the interpreter).Lands before #12 on purpose: #12 then rebases onto the linted main so its review diff is style-clean.
Test plan
bundle exec rubocop: 30 files, no offensesbundle exec rake test: 44 tests greenMade with Cursor