-
-
Notifications
You must be signed in to change notification settings - Fork 629
Make root RuboCop bundle lint-only (no Rails/test stack) #3840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,13 +1,31 @@ | ||||||||||
| # frozen_string_literal: true | ||||||||||
|
|
||||||||||
| # Root Gemfile for developer convenience and RuboCop tooling. | ||||||||||
| # RuboCop is owned here so the monorepo uses one locked version. | ||||||||||
| # Root Gemfile for repo-wide lint/tooling. | ||||||||||
| # | ||||||||||
| # This is intentionally a lint/tooling-only bundle: RuboCop is owned here so the | ||||||||||
| # monorepo (OSS and Pro) resolves it from one committed root Gemfile.lock. | ||||||||||
| # It deliberately does NOT eval_gemfile the react_on_rails package Gemfile, | ||||||||||
| # so a root `bundle install` for lint-only workflows stays fast and does not | ||||||||||
| # pull in the Rails/test/runtime stack. The package Gemfiles continue to own | ||||||||||
| # their RBS/test/runtime dependencies. | ||||||||||
| # | ||||||||||
| # rspec is included only to run the plain-Ruby benchmarks/ script specs from the | ||||||||||
| # repo root (benchmark.yml). Those specs deliberately load no Rails and no | ||||||||||
| # react_on_rails gem (see benchmarks/spec/spec_helper.rb), so the bare rspec gem | ||||||||||
| # is all the root bundle needs — not the package's rspec-rails stack. | ||||||||||
| # | ||||||||||
| # The pinned versions below must match what the react_on_rails and | ||||||||||
| # react_on_rails_pro package locks resolve, to avoid version drift and | ||||||||||
| # unexpected new offenses. | ||||||||||
|
|
||||||||||
| # Use the open-source gem's Gemfile | ||||||||||
| eval_gemfile File.expand_path("react_on_rails/Gemfile", __dir__) | ||||||||||
| source "https://rubygems.org" | ||||||||||
|
|
||||||||||
| group :development, :test do | ||||||||||
| gem "rubocop", "1.61.0", require: false | ||||||||||
| gem "rubocop-performance", "1.20.2", require: false | ||||||||||
| gem "rubocop-rspec", "2.31.0", require: false | ||||||||||
| end | ||||||||||
| # benchmark is no longer a default gem on Ruby >= 3.5; rubocop's executable | ||||||||||
| # requires it, so the lint-only bundle must declare it explicitly. | ||||||||||
| gem "benchmark", require: false | ||||||||||
|
|
||||||||||
| gem "rubocop", "1.61.0", require: false | ||||||||||
| gem "rubocop-performance", "1.20.2", require: false | ||||||||||
| gem "rubocop-rspec", "2.31.0", require: false | ||||||||||
|
|
||||||||||
| gem "rspec", "~> 3.13", require: false | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The three RuboCop gems use exact-version pins ( Consider pinning exactly to match the lock:
Suggested change
Or, if patch-level flexibility is intentional, add a note here clarifying that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment above (lines 17–19) says the pinned versions must match what the package locks resolve, but
Suggested change
…or add a brief comment explaining why rspec intentionally gets a range constraint instead of an exact pin (e.g. "benchmarks/spec is stdlib-only so any 3.13.x is safe"). |
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Root rake breaks lint bundle
Medium Severity
Stopping the root
Gemfilefrom loading the package bundle leavesAGENTS.md’s rootbundleplusrake/rake run_rspec:gemflow without Rails and other package gems. The monorepo rootRakefilestill eager-loadsreact_on_rails/rakelib, which requiresrails/versionbefore tasks run.Additional Locations (1)
AGENTS.md#L41-L70Reviewed by Cursor Bugbot for commit 9b7c081. Configure here.