Skip to content

Update STYLEGUIDE.md to clarify block usage - #449

Merged
issyl0 merged 2 commits into
mainfrom
styleguide-block-chaining-recommendation
Jun 26, 2026
Merged

Update STYLEGUIDE.md to clarify block usage#449
issyl0 merged 2 commits into
mainfrom
styleguide-block-chaining-recommendation

Conversation

@issyl0

Copy link
Copy Markdown
Member

Removed examples and arguments against multiline chaining with {...} in the style guide. This is too much churn for little value. The monolith had >2000 offenses never corrected, and the alternative syntaxes just add more toil.

Removed examples and arguments against multiline chaining with `{...}` in the style guide. This is too much churn for little value. The monolith had >2000 offenses never corrected, and the alternative syntaxes just add more toil.
@issyl0
issyl0 requested a review from a team as a code ownerJune 26, 2026 11:11
CopilotAI review requested due to automatic review settings June 26, 2026 11:11
GitHub Advanced Securitystarted work on behalf of issyl0June 26, 2026 11:12View session
GitHub Advanced Securityfinished work on behalf of issyl0June 26, 2026 11:12

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Ruby style guide’s block delimiter guidance by removing previously included rationale and examples discouraging certain multiline-chaining patterns, aiming to reduce stylistic churn.

Changes:

  • Removes the “good/bad” multiline chaining example contrasting {...} vs do...end.
  • Removes the explanatory paragraph arguing against multiline chaining readability concerns.
Show a summary per file
FileDescription
STYLEGUIDE.mdRemoves examples and narrative text related to multiline chaining/block delimiter preferences.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment threadSTYLEGUIDE.md Outdated
Comment on lines +843 to +846
* Prefer `{...}` over `do...end` for single-line blocks. Avoid using
`{...}` for multi-line blocks (multiline chaining is always
ugly). Always use `do...end` for "control flow" and "method
definitions" (e.g. in Rakefiles and certain DSLs). Avoid `do...end`
when chaining.
definitions" (e.g. in Rakefiles and certain DSLs).
Comment threadSTYLEGUIDE.md Outdated
GitHub Advanced Securitystarted work on behalf of issyl0June 26, 2026 11:17View session
GitHub Advanced Securityfinished work on behalf of issyl0June 26, 2026 11:18

@hharenhharen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@issyl0
issyl0 merged commit f25f585 into mainJun 26, 2026
10 checks passed
@issyl0
issyl0 deleted the styleguide-block-chaining-recommendation branch June 26, 2026 11:34
Sign up for freeto 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.

3 participants

@issyl0@hharen