Skip to content

Avoid parentheses around block expressions - #41

Open
Morriar wants to merge 1 commit into
fix/prefer-not-nil-multiline-receiverfrom
fix/prefer-not-nil-block-parentheses
Open

Avoid parentheses around block expressions#41
Morriar wants to merge 1 commit into
fix/prefer-not-nil-multiline-receiverfrom
fix/prefer-not-nil-block-parentheses

Conversation

@Morriar

@Morriar Morriar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Avoid unnecessary parentheses when autocorrecting T.must calls whose argument is a block expression.

Before:

T.must(options.find { |option| option.title == "Standard" })

was autocorrected to:

(options.find { |option| option.title == "Standard" }).not_nil!

After:

options.find { |option| option.title == "Standard" }.not_nil!

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