mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-02-02 09:47:03 +03:00
CODING_STYLE: provide better explanation why /* */ over // (#7647)
Let's provide a real reason why /* */ should be used for commenting, rather than //, beyond mere taste. (This ultimately simply codifies how I use // vs. /* */ comments, and I think this is useful as an explanation and reason hence.)
This commit is contained in:
parent
a1b2c92d82
commit
c920e651e6
@ -1,9 +1,11 @@
|
|||||||
- 8ch indent, no tabs, except for files in man/ which are 2ch indent,
|
- 8ch indent, no tabs, except for files in man/ which are 2ch indent,
|
||||||
and still no tabs
|
and still no tabs
|
||||||
|
|
||||||
- We prefer /* comments */ over // comments, please. This is not C++, after
|
- We prefer /* comments */ over // comments in code you commit, please. This
|
||||||
all. (Yes we know that C99 supports both kinds of comments, but still,
|
way // comments are left for developers to use for local, temporary
|
||||||
please!)
|
commenting of code for debug purposes (i.e. uncommittable stuff), making such
|
||||||
|
comments easily discernable from explanatory, documenting code comments
|
||||||
|
(i.e. committable stuff).
|
||||||
|
|
||||||
- Don't break code lines too eagerly. We do *not* force line breaks at
|
- Don't break code lines too eagerly. We do *not* force line breaks at
|
||||||
80ch, all of today's screens should be much larger than that. But
|
80ch, all of today's screens should be much larger than that. But
|
||||||
|
Loading…
x
Reference in New Issue
Block a user