HomeFreeBSD

style(9): deprecate blank lines without local vars

Description

style(9): deprecate blank lines without local vars

Previously (208be1617cda) such lines were made optional and several
of us had the impression that they were more completely deprecated.
Do that now.

Requiring a blank line at the top of a function if there are no local
declerations dates to the original style.9 commit (b030a30523649) and was
present in the first version of admin/style/style from mckusick@ in 1991.
It's certainly consistant to have a blank line after a null-set of
variables, but today it's unique to BSD source code and an occational
point of friction to new developers.

Document the historic practice and encourage removal in the context of
other changes, but not sweeping removal commits for their own sake.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D47887

(cherry picked from commit ebfb117e2e04ea71b88e4285cbb1b54d9cc5248c)
(cherry picked from commit 028dae5d3e886fe4c171689d9fc733e1bd68be71)

Details

Provenance
brooksAuthored on Dec 4 2024, 9:43 PM
Reviewer
imp
Differential Revision
D47887: style(9): deprecate blank lines without local vars
Parents
rG1ad44b7f0e0d: style: Allow C++ comments
Branches
Unknown
Tags
Unknown