Bump rubocop-rspec from 3.9.0 to 3.10.0#870
Conversation
Test coverage91.6% line coverage reported by SimpleCov. |
There was a problem hiding this comment.
Stale comment
Dependabot review:
rubocop-rspec3.9.0 → 3.10.0Security
No concerns identified.
rubocop-rspecis a development/test-only linting plugin (Gemfile:development, :testgroup). It is not loaded at application runtime and does not affect production deployments.- No CVEs or GitHub Security Advisories were found for
rubocop-rspec3.9.0 or 3.10.0.- This PR also transitively bumps
rubocop1.86.1 → 1.87.0 and addsregexp_parseras a runtime dependency ofrubocop-rspec. No known vulnerabilities were found for these versions.- Supply-chain posture is unchanged: all gems are published on RubyGems with MFA-enabled releases.
Safety of merging
Low runtime risk; lint CI currently fails.
Area Result Application runtime No impact — dev-only dependency RSpec test suite (CI) Pass — 2460 examples, 0 failures (~3m 10s) RuboCop lint (CI) Fail — 41 new offenses What changed in 3.10.0
The release adds one notable new cop and several fixes to existing cops. No documented breaking API removals.
- New cop
RSpec/MatchWithSimpleRegex— flagsexpect(x).to match(/literal/)where a plaininclude('literal')is clearer. This is the cause of all 41 new offenses in this repo (all autocorrectable).- New cop
RSpec/DiscardedMatcher— detects matchers accidentally left in void context (e.g. missing.and). No offenses detected here.- Tightened
rubocoppeer dependency to~> 1.86, >= 1.86.2, which pulled inrubocop1.87.0. Compatible with existingrubocop-rspec_rails2.32.0 (rubocop-rspec ~> 3.5).- Other changes (bug fixes to
RSpec/ExpectActual,RSpec/SpecFilePathFormat,RSpec/ContainExactly, etc.) did not surface new offenses in this codebase.Affected spec files (27 files, 41 offenses)
All offenses are
RSpec/MatchWithSimpleRegexin spec files underspec/concepts/,spec/features/,spec/graphql/mutations/, andspec/services/— patterns likeexpect(...).to match(/not found/)that RuboCop now suggests rewriting toinclude('not found').Regex-based matchers that use real pattern syntax (e.g.
match(/\d\d-\d\d-\d\d/),match(JoinCodeGenerator::FORMAT_REGEX)) were not flagged.Local testing
Could not run the suite in this automation environment (no Docker/Ruby toolchain available; Ruby 4.0.5 install failed due to network/SSL restrictions). Relied on GitHub Actions CI for the PR branch:
testjob: passedlintjob: failed (41RSpec/MatchWithSimpleRegexoffenses)Recommendation: Merge with caution
The version bump itself is safe and tests pass, but do not merge as-is — CI lint is red.
Before merging, choose one of:
Preferred: Run autocorrect on the PR branch:
bundle exec rubocop -AAll 41 offenses are marked
[Correctable]; this rewrites simplematch(/literal/)calls toinclude('literal')with no behavioural change to test intent.Alternative: Disable
RSpec/MatchWithSimpleRegexin the shared digital-engineering RuboCop config (or locally in.rubocop.yml) if the team prefers to adopt that style separately.Once lint passes, this is a straightforward dev-dependency upgrade with no production impact.
Sent by Cursor Automation: Editor-* - Tests Dependabot PRs
There was a problem hiding this comment.
Dependabot review: rubocop-rspec 3.9.0 → 3.10.0
Recommendation: Hold — safe dependency bump, but CI lint is currently failing on this branch. Fix the new RuboCop offenses (all autocorrectable) before merging.
Security
- No known CVEs or GitHub security advisories for
rubocop-rspec3.10.0 (or 3.9.0). - This is a dev-only linting plugin; it is not loaded at application runtime and does not affect production attack surface.
- The lockfile also resolves
rubocop1.86.1 → 1.87.0 as a transitive dependency (required byrubocop-rspec≥ 3.10.0). No published advisories were found for these versions either. - Supply chain: gem is MIT-licensed, published from the official
rubocop/rubocop-rspecrepo with MFA-required publishing. No supply-chain red flags identified.
Verdict: No security concerns introduced or resolved by this bump.
Safety of merging / behavioural impact
| Area | Impact |
|---|---|
| Runtime / tests | No production behaviour change. Full RSpec suite passes on CI (91.57% SimpleCov line coverage). |
| Lint (CI gate) | Fails — 41 new offenses, all [Correctable]. |
| Breaking API changes | None documented in the 3.10.0 changelog. |
What changed in 3.10.0 (relevant to this repo):
- New cop
RSpec/MatchWithSimpleRegex— flagsexpect(x).to match(/literal/)and suggestsinclude('literal'). This is the source of 40 offenses acrossspec/concepts/**,spec/features/**,spec/graphql/**, andspec/services/**. - New cop
RSpec/DiscardedMatcher— no offenses detected in this codebase. - Bug fixes to existing cops (
RSpec/ContainExactly,RSpec/ExpectActual,RSpec/SpecFilePathFormat, etc.) — should reduce false positives, no new failures observed. - Transitive
rubocop1.87.0 introduces 1 offense:Style/RedundantSelfinapp/models/project.rb:117(unrelated to RSpec cops).
Repo configuration: .rubocop.yml inherits shared RSpec rules from digital-engineering/configs/rubocop-rspec.yml and does not disable the new cops. .rubocop_todo.yml has no entries for MatchWithSimpleRegex or DiscardedMatcher.
Note: RSpec/DiscardedMatcher was listed in both 3.9.0 and 3.10.0 changelogs; 3.10.0 appears to be the release where it is fully active under current RuboCop.
CI / test results
| Check | Result |
|---|---|
| test (RSpec) | ✅ Pass |
| lint (RuboCop) | ❌ Fail — 501 files inspected, 41 offenses (41 autocorrectable) |
| CLA | ✅ Pass |
Local environment: Docker and Ruby 4.0.5 were unavailable in the review agent environment; results above are from CI run 27537688810.
Recommendation: Hold
The bump itself is low-risk and tests are green, but merging as-is will leave main with a failing lint CI gate.
Before merge, either:
- Run
bundle exec rubocop -Aon this branch to auto-correct all 41 offenses (mostlymatch(/…/)→include('…')in specs, plus oneselfremoval inproject.rb), or - Disable
RSpec/MatchWithSimpleRegexin the shareddigital-engineeringRuboCop config (or locally in.rubocop.yml) if the team prefers to keepmatchfor substring assertions.
After the lint fix, re-run CI and merge. Optionally consider bumping to 3.10.2 (latest patch) which includes fixes for RSpec/MatchWithSimpleRegex false positives with regex options/interpolations.
Review by Cursor automation
Sent by Cursor Automation: Editor-* - Tests Dependabot PRs
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/rubocop/rubocop-rspec/releases) - [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop-rspec@v3.9.0...v3.10.0) --- updated-dependencies: - dependency-name: rubocop-rspec dependency-version: 3.10.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
All these changes are from using regexes when include could be used
6b1d751 to
5f2dd8f
Compare


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)