aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-15 10:26:07 +0100
committerGitHub <noreply@github.com>2017-12-15 10:26:07 +0100
commitc920e651e6d93794bf021706d0a7f5df0c0a88e6 (patch)
treec8409566294d7603db00011e1bbc49caab84522b /CODING_STYLE
parentfinal v236 update (#7649) (diff)
downloadsystemd-c920e651e6d93794bf021706d0a7f5df0c0a88e6.tar.gz
systemd-c920e651e6d93794bf021706d0a7f5df0c0a88e6.tar.bz2
systemd-c920e651e6d93794bf021706d0a7f5df0c0a88e6.zip
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.)
Diffstat (limited to 'CODING_STYLE')
-rw-r--r--CODING_STYLE8
1 files changed, 5 insertions, 3 deletions
diff --git a/CODING_STYLE b/CODING_STYLE
index 4119cfec2..ae818126c 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -1,9 +1,11 @@
- 8ch indent, no tabs, except for files in man/ which are 2ch indent,
and still no tabs
-- We prefer /* comments */ over // comments, please. This is not C++, after
- all. (Yes we know that C99 supports both kinds of comments, but still,
- please!)
+- We prefer /* comments */ over // comments in code you commit, please. This
+ way // comments are left for developers to use for local, temporary
+ 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
80ch, all of today's screens should be much larger than that. But