History log of /freebsd/share/man/man9/style.9 (Results 1 – 25 of 328)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0, release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0
# 93f7a302 27-May-2021 Ed Maste <emaste@FreeBSD.org>

style.9: be explicit about booleans in comparisons

We prefer something like "if (count != 0)" over "if (count)" for
non-boolean variables. This was implicit in examples, but was unclear
for some ne

style.9: be explicit about booleans in comparisons

We prefer something like "if (count != 0)" over "if (count)" for
non-boolean variables. This was implicit in examples, but was unclear
for some new contributors. Attempt to clarify by providing a more
explicit statement and example.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30507

show more ...


# d55d5dd9 22-Oct-2024 Ed Maste <emaste@FreeBSD.org>

style.9: clarify FALLTHROUGH

FALLTHROUGH is intended for a block of code that cascades to the next
case block. Multiple case statements sharing a single block of code do
not need a FALLTHROUGH comm

style.9: clarify FALLTHROUGH

FALLTHROUGH is intended for a block of code that cascades to the next
case block. Multiple case statements sharing a single block of code do
not need a FALLTHROUGH comment.

Reviewed by: imp, markj, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47242

show more ...


# 0a59a6b0 25-Jul-2024 Warner Losh <imp@FreeBSD.org>

style: Allow C++ comments

Attempt to craft the more-or-less conesnsus view on C++ BCPL-style
comments. Allowing them seemed to have wide support. Consistent use was
highly desired. What constituted

style: Allow C++ comments

Attempt to craft the more-or-less conesnsus view on C++ BCPL-style
comments. Allowing them seemed to have wide support. Consistent use was
highly desired. What constituted consistent use, however, didn't have
good consensus especially with multi-line comments. Craft something
that's a little vague to allow what appears to be a range in common
practices elsewhere and no good way to drive this do absolute agreement.

We should revisit this point in 6-12 months after we get some experience
with it.

Sponsored by: Netflix
Discussed with: many in the code reivew, see discussion there
Differential Revision: https://reviews.freebsd.org/D35960

show more ...


# fd31c094 03-Jul-2024 Warner Losh <imp@FreeBSD.org>

cdefs.h: Add back comment about branch prediction

Add back, with editing, the comments about branch prediction, when to
use it, etc. Offer stronger opinions about this in style(9). Add in the
conven

cdefs.h: Add back comment about branch prediction

Add back, with editing, the comments about branch prediction, when to
use it, etc. Offer stronger opinions about this in style(9). Add in the
convention for FreeBSD that we do only the entire expression in the if
expression. Advise use only when it makes things measurably faster.

Requested by: jhb
Sponsored by: Netflix
Reviewed by: brooks, jhb
Differential Revision: https://reviews.freebsd.org/D45837

show more ...


# a1cfe4c7 03-Jul-2024 Warner Losh <imp@FreeBSD.org>

style(9): Delete __FBSDID straggler

We no longer need advice on __FBSDID, so delete it.

Sponsored by: Netflix


# 5626f9e7 26-Apr-2024 Mateusz Piotrowski <0mp@FreeBSD.org>

style.9: Document the existence of tools/build/checkstyle9.pl

MFC after: 3 days
Sponsored by: Klara, Inc.


# a26b96a9 30-Jan-2024 Warner Losh <imp@FreeBSD.org>

style(9): Note larger divergence than implied

Times have changed, and we've diverged somewhat from the original style
guide, while still keeping much of the flavor and flair of its spirit as
the C l

style(9): Note larger divergence than implied

Times have changed, and we've diverged somewhat from the original style
guide, while still keeping much of the flavor and flair of its spirit as
the C language has evolved over the last 30 years since 4.4 was
released.

Sponsored by: Netflix

show more ...


# bea67504 30-Jan-2024 Minsoo Choo <minsoochoo0122@proton.me>

style(9): Remove $FreeBSD$ recommendation.

Now that stable/12 is now EOL, there's no reason to do this. They've
been proactively removed from the tree.

Reviewed by: imp, lwhsu
Differential Revision

style(9): Remove $FreeBSD$ recommendation.

Now that stable/12 is now EOL, there's no reason to do this. They've
been proactively removed from the tree.

Reviewed by: imp, lwhsu
Differential Revision: https://reviews.freebsd.org/D43641

show more ...


# 97759ccc 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

share: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl

share: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# e2fa10e6 28-Jul-2022 Warner Losh <imp@FreeBSD.org>

style: Tighten up one use of 'may'

Declarations of variables must be placed before the statements of a
block, by convention. Use 'must' instead of 'may' here and clarify
langauge.

Sponsored by: Ne

style: Tighten up one use of 'may'

Declarations of variables must be placed before the statements of a
block, by convention. Use 'must' instead of 'may' here and clarify
langauge.

Sponsored by: Netflix
Reviewed by: pstef, rpokala, hselasky
Differential Revision: https://reviews.freebsd.org/D35959

show more ...


# 0cf5abd7 28-Jul-2022 Warner Losh <imp@FreeBSD.org>

style: Use oxford comma in one place.

Suggested by: pauamma
Sponsored by: Netflix


# ea86fed5 28-Jul-2022 Warner Losh <imp@FreeBSD.org>

Style(9): Strengthen statements about not using K&R function definitions

K&R function definitions will soon be obsolete. Work has been underway
to remove all K&R function definitions from the tree f

Style(9): Strengthen statements about not using K&R function definitions

K&R function definitions will soon be obsolete. Work has been underway
to remove all K&R function definitions from the tree for a while now. A
future C version will remove this construct from the language. So
strengthen existing statements about K&R function definitions and
declarations.

While here, remove __P macro reference. It's not been in active use for
almost two decades apart from legacy contrib code.

Sponsored by: Netflix
Reviewed by: pauamma, rpokala, hselasky, kp, brooks, markm, emaste
Differential Revision: https://reviews.freebsd.org/D35945

show more ...


# 7510633e 04-Feb-2022 Warner Losh <imp@FreeBSD.org>

style(9): Default to omitting $FreeBSD$

Advise people to omit $FreeBSD$ (in both comments and macros) unless the
code is definitely going to be merged to stable/12. This strengthens
previous stateme

style(9): Default to omitting $FreeBSD$

Advise people to omit $FreeBSD$ (in both comments and macros) unless the
code is definitely going to be merged to stable/12. This strengthens
previous statements and is appropriate now that stable/11 is no longer
supported. If people are wrong and things are unexpected merged to 12,
tags can be added before that merge. No sense adding a tag that will
never be expanded and removed later on the off chance it might wind up
in stable/12.

The next step is likely to weaken this to apply just to mergemaster
managed files, but not today.

Reviewed by: rpokala, cem, erj, hselasky, brooks, kib
Differential Revision: https://reviews.freebsd.org/D34152

show more ...


# f49931c1 17-Aug-2021 Piotr Pawel Stefaniak <pstef@FreeBSD.org>

style.9: remove an outdated comment about indent(1)

indent(1) has had -ncs and -nbs for some time now.


# 5851680b 17-Jun-2021 Warner Losh <imp@FreeBSD.org>

style(9): Add advice about $FreeBSD$

Codify our standard practice with $FreeBSD$
o New code only needs it if it might land in stable/12
o Old code should retain it until stable/12 is unsupported
o W

style(9): Add advice about $FreeBSD$

Codify our standard practice with $FreeBSD$
o New code only needs it if it might land in stable/12
o Old code should retain it until stable/12 is unsupported
o We'll do a bulk remove in the future: don't do it proactively.
o Give advice about how to tag files derived from other files
in the tree.

Reviewed by: bcr, allanjude,ceri
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30789

show more ...


# a3238e92 11-Jun-2021 Warner Losh <imp@FreeBSD.org>

style: Relax 80 column rule

Note that the 80 column rule has been relaxed for some time when things
are clearer when a little longer. Add in that things that people grep
for, such as error messages,

style: Relax 80 column rule

Note that the 80 column rule has been relaxed for some time when things
are clearer when a little longer. Add in that things that people grep
for, such as error messages, shouldn't be broken up which is the most
common reason people exceed 80 columns intentionally.

Reviewed by: jhb, domagoj.stolfa@gmail.com
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30255

show more ...


# ab6145c9 11-Jun-2021 Warner Losh <imp@FreeBSD.org>

style: tweak tab after #define advice

Once upon a time, #define<tab> was cultural thing. However, even when it
was promulgated, it was a minority usage. 20 years ago the split was
30k/69k (tab/space

style: tweak tab after #define advice

Once upon a time, #define<tab> was cultural thing. However, even when it
was promulgated, it was a minority usage. 20 years ago the split was
30k/69k (tab/space) and today the split is 80k/546k (tab/space). Update
guidance to allow either with the usual suggestion to be consistent
within a file.

Reviewed by: sef, allenjude, 0mp (prior rev), jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D30254

show more ...


Revision tags: release/13.0.0
# b4e4f070 28-Oct-2020 Warner Losh <imp@FreeBSD.org>

Note that sys/systm.h is special too

If you need / want to includerd sys/systm.h, it has to be just after
param.h/types.h. Document this existing practice. Not all kernel files
include systm.h, but

Note that sys/systm.h is special too

If you need / want to includerd sys/systm.h, it has to be just after
param.h/types.h. Document this existing practice. Not all kernel files
include systm.h, but when you do, it should be done out of order.

Reviewed by: vangyzen, kib, emaste
Differential Review: https://reviews.freebsd.org/D26981

show more ...


Revision tags: release/12.2.0
# e2c0e292 16-Jul-2020 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 34a8e736 16-Jul-2020 Warner Losh <imp@FreeBSD.org>

Relax the rule against declaring variables in nested scopes and for
initializations.

Relax some overly perscriptive rules against declarations: they may be at the
start of any blocks, even if things

Relax the rule against declaring variables in nested scopes and for
initializations.

Relax some overly perscriptive rules against declarations: they may be at the
start of any blocks, even if things aren't super complicated. Allow more
initializations (those that call simple functions, like accessor functions for
newbus are fine). Allow the common idiom of declaring the loop variable in a for
loop.

This tries to codify what common exceptions are today, as well as give
some guidance on when it's best to do these things.

Reviewed by: tsoome, kp, markm, allanjude, jiles, cem, rpokala
(earlier versions: seanc, melifaro, bapt, pjd, bz, pstef, arichards,
jhibits, vangyzen, jmallet, ian, glebius, jhb, dab, adrian,
sef, gnn)
Differential Revision: https://reviews.freebsd.org/D25312

show more ...


# 6d33315d 30-Jun-2020 Mateusz Piotrowski <0mp@FreeBSD.org>

Cross-reference style(9) and style.mdoc(5)

Suggested by: yuripv
MFC after: 3 days


Revision tags: release/11.4.0
# 75dfc66c 27-Feb-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r358269 through r358399.


# 68a22984 27-Feb-2020 Warner Losh <imp@FreeBSD.org>

_Static_assert is to be preferred to CTASSERT.

Document the existing prefernce that _Static_assert be used in preference to the
old CTASSERT we used to use for compile time assertions.


12345678910>>...14