Commit 7f800d90 authored by W. Michael Petullo's avatar W. Michael Petullo
Browse files

Add coding standards to documentation


Signed-off-by: W. Michael Petullo's avatarW. Michael Petullo <mike@flyn.org>
parent 45f0ac3f
......@@ -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
......
<?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>
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment