Skip to content

Comments

Add a section on vertical space#227

Merged
hadley merged 3 commits intomainfrom
vertical-space
Sep 30, 2024
Merged

Add a section on vertical space#227
hadley merged 3 commits intomainfrom
vertical-space

Conversation

@hadley
Copy link
Member

@hadley hadley commented Sep 30, 2024

@MichaelChirico how does this look to you?

Fixes #185.

hadley and others added 2 commits September 30, 2024 14:25
Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>

* Avoid empty lines at the start or end of functions.
* Only use a single empty line when needed to separate functions or pipes.
* It often makes sense to put an empty line before a comment block, to help visually connect the explanation with the code that it applies to.
Copy link
Collaborator

Choose a reason for hiding this comment

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

My read is this implies "When a comment block is the first thing in a function body, a blank line is OK". Makes sense to me, but we may want to iterate the wording if that's not the intention.

@hadley hadley merged commit bfc73d3 into main Sep 30, 2024
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.

Recommendations for vertical whitespace

2 participants