[libvirt PATCH 4/4] docs: coding-style: One variable declaration per line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was not mentioned before.

Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 docs/coding-style.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/docs/coding-style.rst b/docs/coding-style.rst
index 14c5136398..e1ed34f764 100644
--- a/docs/coding-style.rst
+++ b/docs/coding-style.rst
@@ -600,6 +600,19 @@ calling another function.
         ...
     }
 
+Define variables on separate lines. This allows for smaller, easier to
+understand diffs when changing them. Define variables in the smallest
+possible scope.
+
+::
+
+  GOOD:
+    int x;
+    int y;
+
+  BAD:
+    int x, y;
+
 Attribute annotations
 ---------------------
 
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux