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

@issyl0 issyl0 commented Jun 26, 2026

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 owner June 26, 2026 11:11
Copilot AI review requested due to automatic review settings June 26, 2026 11:11
GitHub Advanced Security started work on behalf of issyl0 June 26, 2026 11:12 View session
GitHub Advanced Security finished work on behalf of issyl0 June 26, 2026 11:12

Copilot AI 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
File Description
STYLEGUIDE.md Removes 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 thread STYLEGUIDE.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 thread STYLEGUIDE.md Outdated
GitHub Advanced Security started work on behalf of issyl0 June 26, 2026 11:17 View session
GitHub Advanced Security finished work on behalf of issyl0 June 26, 2026 11:18

@hharen hharen 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 main Jun 26, 2026
10 checks passed
@issyl0 issyl0 deleted the styleguide-block-chaining-recommendation branch June 26, 2026 11:34
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.

3 participants