Skip to contentSkip to conversation

CodingGuidelines: document // comments

PATCH Superseded Junio C Hamano 2 participants 2 messages Feb 11 – Feb 12 Documentation

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CodingGuidelines: document // comments

We do not use // comments in our C code, which is implied by the description of multi-line comment rule and its examples, but is not explicitly spelled out. Spell it out.

---
 Documentation/CodingGuidelines | 2 ++
 1 file changed, 2 insertions(+)
Documentation/CodingGuidelines +2 -0
index b358d6bfb8..507d52b0d3 100644
@@ -439,6 +439,8 @@ For C programs:
 	 */
 	_("Here is a translatable string explained by the above.");
 
+   We do not use // comments.
+
  - Double negation is often harder to understand than no negation
    at all.
 
Signature · 1 line
2.53.0-247-g50a2c88be3
#1 lore raw
Quoted 14 lines · Junio C Hamano

We do not use // comments in our C code, which is implied by the description of multi-line comment rule and its examples, but is not explicitly spelled out. Spell it out.

---
 Documentation/CodingGuidelines | 2 ++
 1 file changed, 2 insertions(+)
Documentation/CodingGuidelines +0 -0
index b358d6bfb8..507d52b0d3 100644

Documentation/CodingGuidelines For C programs: · line 445

Quoted 7 lines
Documentation/CodingGuidelines +2 -0
@@ -439,6 +439,8 @@ For C programs:
 	 */
 	_("Here is a translatable string explained by the above.");
 
+   We do not use // comments.
+
  - Double negation is often harder to understand than no negation
    at all.

Makes sense and looks good to me. Thanks!

Patrick