Page MenuHomeFreeBSD

Document the convention of adding a blank line before comments.
AcceptedPublic

Authored by markj on Sep 25 2019, 4:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Aug 5 2025, 10:34 PM
Unknown Object (File)
Aug 2 2025, 11:44 PM
Unknown Object (File)
Jul 26 2025, 12:26 PM
Unknown Object (File)
Jun 25 2025, 1:59 AM
Unknown Object (File)
Apr 20 2025, 1:33 PM
Unknown Object (File)
Apr 20 2025, 10:50 AM
Unknown Object (File)
Apr 20 2025, 10:32 AM
Unknown Object (File)
Apr 20 2025, 10:04 AM
Subscribers
None

Details

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26718
Build 25078: arc lint + arc unit

Event Timeline

Bump .Dd before commit, of course.

This revision is now accepted and ready to land.Sep 25 2019, 4:13 PM

I was told by bde (?) that after the block of code that is described by the multi-line comment, there should be a blank line. Since you carefully document other moments, this one should be described as well, I believe.

This revision now requires review to proceed.Sep 26 2019, 4:16 PM

I don't know if this update is a hard and fast style rule, but it makes sense to me in contexts like the written example. IMO, people shouldn't take it too literally — for example, if the code described is at the end of a block using }, you don't necessarily need a blank line to delineate scope, because the } line ends the scope neatly.

(If your block is a single statement and lacks {/}, and has a multi-line comment, maybe it should add {/} rather than a blank line. I don't feel the need to codify that in style.9.)

This revision is now accepted and ready to land.Sep 26 2019, 4:57 PM