[gnome-system-monitor] Add HACKING file with coding style notes



commit 324aaabe2f656a44b735ae192751601af5976ec1
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Jul 25 13:22:22 2013 +0200

    Add HACKING file with coding style notes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704856

 HACKING |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/HACKING b/HACKING
new file mode 100644
index 0000000..70db260
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,34 @@
+Coding style
+============
+
+The current codebase is not really consistent about coding
+style. However, for new code we should conform to what seems to be the
+most common habits:
+
+  * Use four-space indents.
+
+  * Put open curly braces on the same line of the associated
+    statement. Omit braces if *both* sides of the statement are on one
+    line. So for instance
+
+        if (foo = 0) {
+            bar ();
+            baz ();
+        } else {
+            qux ();
+        }
+
+    and
+
+        if (foo = 0)
+            bar ();
+        else
+            qux ();
+
+  * Put one space between the function name and the open parenthesis, so
+
+        foo ();
+
+    and not
+
+        foo();
\ No newline at end of file


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