[SCM] UNNAMED PROJECT branch, master, updated. 20090201-1-45-g46c2aeb

Chris Lamb lamby at debian.org
Sun Feb 22 15:14:38 UTC 2009


The following commit has been merged in the master branch:
commit 646956d1b2d4968e525b951d6bf23f63d33ca1cc
Author: Chris Lamb <lamby at debian.org>
Date:   Sun Feb 22 14:31:56 2009 +0000

    Some updates to coding style.

diff --git a/xml/chapters/coding-style.xml b/xml/chapters/coding-style.xml
index 7c3e6e0..dc00c43 100644
--- a/xml/chapters/coding-style.xml
+++ b/xml/chapters/coding-style.xml
@@ -12,9 +12,9 @@
 <title>Compatibility</title>
 
 <itemizedlist>
-	<listitem>Don't use bashisms, e.g. no arrays.</listitem>
-	<listitem>Only use posix subset, e.g. use $(foo) rather than `foo`.</listitem>
-	<listitem>Do check your scripts with 'sh -n' and 'checkbasishm'.</listitem>
+	<listitem>Don't use syntax or semantics that are unique to the Bash shell. For example, the use of array constructs.</listitem>
+	<listitem>Only use the POSIX subset - for example, use $(foo) over `foo`.</listitem>
+	<listitem>You can check your scripts with 'sh -n' and 'checkbashisms'</listitem>
 </itemizedlist>
 </sect1>
 
@@ -22,7 +22,7 @@
 <title>Indenting</title>
 
 <itemizedlist>
-	<listitem>Always use tabs and not spaces.</listitem>
+	<listitem>Always use tabs over spaces.</listitem>
 </itemizedlist>
 
 </sect1>
@@ -33,7 +33,7 @@
 <itemizedlist>
 	<listitem>Generally, lines are 80 chars at maximum.</listitem>
 
-	<listitem>Use the linux like line breaks:
+	<listitem>Use the "Linux style" of line breaks:
 
 	<para>Bad:
 
@@ -54,7 +54,7 @@ fi
 </screen>
 	</para></listitem>
 
-	<listitem>Same for functions:
+	<listitem>The same holds for functions:
 
 	<para>Bad:
 
@@ -85,8 +85,8 @@ foo ()
 	<listitem>Variables that used in config always start with LH_ prefix.</listitem>
 	<listitem>Internal, live-helper controlling variables start with _LH_ prefix.</listitem>
 	<listitem>Local variables start with __LH_ prefix.</listitem>
-	<listitem>Put curly brackets arround them, write ${FOO} not $FOO.</listitem>
-	<listitem>Always protect variables wrt/ potential whitespaces, write "${FOO}" not ${FOO}.</listitem>
+	<listitem>Use braces around variables; eg. write ${FOO} instead of $FOO.</listitem>
+	<listitem>Always protect variables with respect to potential whitespaces, write "${FOO}" not ${FOO}.</listitem>
 	<listitem>For consistency reasons, always use quotes when assigning values to variables:
 
 	<para>Bad:
@@ -131,8 +131,8 @@ fi
 <title>Miscellaneous</title>
 
 <itemizedlist>
-	<listitem>Use "|" (without "") as a seperator in sed calls, e.g. "sed -e 's|foo|bar|'" (without "").</listitem>
-	<listitem>Don't use test for comparisons or tests, use "[" "]" (without ""), e.g. "if [ -x /bin/foo ]; ..." and not "if test -x /bin/foo; ...".</listitem>
+	<listitem>Use "|" (without the surround quotes) as a seperator in calls to sed, e.g. "sed -e 's|foo|bar|'" (without "").</listitem>
+	<listitem>Don't use the test command for comparisons or tests, use "[" "]" (without ""), e.g. "if [ -x /bin/foo ]; ..." and not "if test -x /bin/foo; ...".</listitem>
 
 </itemizedlist>
 

-- 
UNNAMED PROJECT



More information about the debian-live-changes mailing list