[Pkg-privacy-commits] [libgsecuredelete] 38/168: Added some info about the coding style.
Ulrike Uhlig
u-guest at moszumanska.debian.org
Thu Jul 7 20:06:36 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch master
in repository libgsecuredelete.
commit 0c0f69321395cafa14fa0f15217913c4bff3c795
Author: Colomban Wendling <ban at herbesfolles.org>
Date: Fri Oct 9 00:08:50 2009 +0200
Added some info about the coding style.
Completed the HACKING file with some considerations about the coding style.
---
HACKING | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/HACKING b/HACKING
index 52ba2b0..c9e599b 100644
--- a/HACKING
+++ b/HACKING
@@ -27,4 +27,38 @@
= Coding style
-Watch the code and see!
+The code follows something like K&R style, but watch the code and see!
+
+== Brackets
+The brackets are in the same line as the conditional branching, errordomain,
+properties, locks and so, but in the very next line after function and method
+definitions, namespaces, and classes.
+
+== Blank lines
+Every blank line must be *indented*.
+Outside functions, every "block" is separated by one blank line. It means
+between functions, methods, properties, etc.
+Inside functions, there is generally 2 blank lines: one right after the variable
+declarations, and one right before the ending return statement. You may also add
+blank lines inside functions if the function is quite long, but you may not need
+it often.
+
+== Commentaries
+You must add a documentation for every public function, method, class.. and at
+least a short commentary explaining what it does for the private and protected
+ones. The documentation and the short commentary is placed on the very top of
+the definition.
+You may add few commentaries inside functions, methods, etc. when the code is
+not clear or if it is a very important detail, but you MUST NOT abuse of these
+kind of commentaries. Too much commentaries kills the commentary: it makes the
+code itself very hard to follow, then the code's self-explaining is hidden; and
+code is more likely the same through programmers than the commentaries, then
+it is more easily read in many cases.
+You may place a commentary in the line just before what it documents, or, in
+case of very short comments, at the en of the line it documents.
+
+=== FIXMEs and TODOs.
+If you want to insert FIXME or TODOs, place it in simple comments and place the
+"FIXME:" or "TODO:" (with the colon) keyword at the start. Of course, if the
+comment contains more than one FIXME/TODO, you must place one of these keywords
+before every ones in the comment.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git
More information about the Pkg-privacy-commits
mailing list