[libdmapsharing] Add coding standards to documentation Signed-off-by: W. Michael Petullo <mike flyn org>
- From: W. Michael Petullo <wmpetullo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdmapsharing] Add coding standards to documentation Signed-off-by: W. Michael Petullo <mike flyn org>
- Date: Fri, 4 Mar 2011 17:55:56 +0000 (UTC)
commit 7f800d9026b3abe49bc17bff4de5a7f2a7f907eb
Author: W. Michael Petullo <mike flyn org>
Date: Fri Mar 4 11:55:10 2011 -0600
Add coding standards to documentation
Signed-off-by: W. Michael Petullo <mike flyn org>
TODO | 8 ++++
docs/coding-standards.xml | 76 ++++++++++++++++++++++++++++++++++++++
docs/libdmapsharing-3.0-docs.xml | 1 +
3 files changed, 85 insertions(+), 0 deletions(-)
---
diff --git a/TODO b/TODO
index be8c915..2e82bba 100644
--- a/TODO
+++ b/TODO
@@ -4,6 +4,14 @@ Noah: DNS-SD implementation
Finish browser side support.
Update MacPorts port to no longer require avahi.
+Documentation:
+ Improve content (Noah?)
+ Fix bad characters (UTF-8 issue?)
+ Fix alignment of object description code
+ Fix "up" icon in second level pages
+ Add standard sidebar
+ Improve aesthetics
+
= Mid term =====================================================================
Noah: Comment purpose of each source file and describe interfaces, using test
diff --git a/docs/coding-standards.xml b/docs/coding-standards.xml
new file mode 100644
index 0000000..508a1a3
--- /dev/null
+++ b/docs/coding-standards.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
+<refentry id="coding-standards">
+ <refmeta>
+ <refentrytitle>Libdmapsharing Coding Standards</refentrytitle>
+ <manvolnum>3</manvolnum>
+ <refmiscinfo>Libdmapsharing</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>Libdmapsharing Client Internals</refname>
+ <refpurpose>
+ Description of libdmapsharing's coding standards
+ </refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Libdmapsharing Coding Standards</title>
+<itemizedlist>
+
+ <listitem>Use tabs to indent</listitem>
+
+ <listitem>Use spaces to align</listitem>
+
+ <listitem>Attempt to limit lines to 80 characters</listitem>
+
+ <listitem>Use whitespace to keep expressions clear:
+<programlisting>
+int foo = x + 1 - bar (y);
+</programlisting>
+ </listitem>
+
+ <listitem>In order to protect against an accidental use of assignment in a Boolean expression, use:
+<programlisting>if (CONSTANT == variable)</programlisting>
+ not:
+<programlisting>if (variable == CONSTANT)</programlisting></listitem>
+
+ <listitem>Braces should be formatted as follows:
+<programlisting>
+if (foo) {
+ something ();
+}
+</programlisting>
+ or, in the case of function definitions:
+<programlisting>
+void foo (void)
+{
+ something ();
+}
+</programlisting>
+ </listitem>
+
+ <listitem>Perform a Git commit after finishing a single
+ task</listitem>
+
+ <listitem>Patches submitted should perform one task (e.g.,
+ don't add functionality and reformat existing code in the same
+ patch)</listitem>
+
+ <listitem>Git commit messages should be of the following form:
+<literallayout>single line summary with no period
+
+Optional detailed description. This should use paragraph grammar,
+including periods. This may be any number of lines long. Paragraphs are
+separated by an empty line but are not indented. Lines are less than 80
+characters long.
+</literallayout>
+ </listitem>
+
+ <listitem>Use GObject conventions for things not covered here</listitem>
+
+</itemizedlist>
+ </refsect1>
+</refentry>
diff --git a/docs/libdmapsharing-3.0-docs.xml b/docs/libdmapsharing-3.0-docs.xml
index 8d7e8d8..ece5986 100644
--- a/docs/libdmapsharing-3.0-docs.xml
+++ b/docs/libdmapsharing-3.0-docs.xml
@@ -31,6 +31,7 @@
<chapter>
<title>Libdmapsharing Internals</title>
+ <xi:include href="coding-standards.xml"/>
<xi:include href="server-internals.xml"/>
<xi:include href="client-internals.xml"/>
</chapter>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]