summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2023-02-06 09:48:22 +0200
committerMichal Domonkos <mdomonko@redhat.com>2023-03-13 15:32:25 +0100
commit4d373b36b89ddcb284a3c22eff71d0fc7d266d32 (patch)
tree8e2f96837774e505dc0ef20f7ea34fa9983fd8f9
parentee38497d72012828ce3ba0ee4a99dc41c6e4953f (diff)
downloadrpm-4d373b36b89ddcb284a3c22eff71d0fc7d266d32.tar.gz
Document rpm codebase comment style
(cherry picked from commit 7f8675936c87209f41e248da79277ff5f2a385c2)
-rw-r--r--CONTRIBUTING.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 217b1e3f0..2e275a166 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -84,6 +84,18 @@ Always prefer self-explanatory code over comments! Many times well-named
helper variables can make even complicated code read almost like plain
English.
+Comments are always in `/* ... */`, never `//`. The two comment styles
+in rpm codebase are:
+
+`/* Short and sweet */`
+
+```
+/*
+ * Multi-line comments should be formatted
+ * like this.
+ */
+```
+
### Error handling
Avoid multiple exit points from functions, these are an invitation to