Skip to content

RUBY-3982 Enable Lint/UnreachableCode cop - #3114

Open
jamis wants to merge 1 commit into
mongodb:masterfrom
jamis:3982-unreachable-code
Open

jamis wants to merge 1 commit into
mongodb:masterfrom
jamis:3982-unreachable-code

Conversation

@jamis

@jamis jamis commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Cleans up Lint/UnreachableCode by removing the cop's exclusion from .rubocop_todo.yml and fixing the two offenses it reported.

In Sections::PayloadOne.deserialize the method is an intentional NotImplementedError stub, so I deleted the abandoned implementation below the raise (its size arithmetic was wrong anyway) and widened the signature to match its two-argument call site.

In the unified test runner's isTimeoutError branch, a stray raise made the intended Error::ErrorMismatch unreachable; I removed it so the mismatch is reported as intended.

Remove the cop's exclusion from .rubocop_todo.yml and fix the two
offenses it reported.

Sections::PayloadOne.deserialize is a deliberate NotImplementedError
stub; delete the abandoned implementation below the raise and widen
the signature to match its call site.

In the unified test runner, drop a stray raise that made the intended
Error::ErrorMismatch raise unreachable in the isTimeoutError branch.
@jamis
jamis requested a review from a team as a code owner October 14, 2026 19:30
@jamis
jamis requested review from JamesKovacs and comandeo-mongo and removed request for JamesKovacs October 14, 2026 19:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant