From 4d373b36b89ddcb284a3c22eff71d0fc7d266d32 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 6 Feb 2023 09:48:22 +0200 Subject: Document rpm codebase comment style (cherry picked from commit 7f8675936c87209f41e248da79277ff5f2a385c2) --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- cgit v1.2.1