You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by cm...@apache.org on 2008/06/03 21:12:23 UTC

svn commit: r662860 - in /incubator/couchdb/site/htdocs/community: lists.html standards.html standards.txt

Author: cmlenz
Date: Tue Jun  3 12:12:23 2008
New Revision: 662860

URL: http://svn.apache.org/viewvc?rev=662860&view=rev
Log:
site: Added minimal set of basic coding standards.

Modified:
    incubator/couchdb/site/htdocs/community/lists.html
    incubator/couchdb/site/htdocs/community/standards.html
    incubator/couchdb/site/htdocs/community/standards.txt

Modified: incubator/couchdb/site/htdocs/community/lists.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/site/htdocs/community/lists.html?rev=662860&r1=662859&r2=662860&view=diff
==============================================================================
--- incubator/couchdb/site/htdocs/community/lists.html (original)
+++ incubator/couchdb/site/htdocs/community/lists.html Tue Jun  3 12:12:23 2008
@@ -86,11 +86,11 @@
 
 <ul>
 <li>To <strong>subscribe</strong>, send an email to
-<a href="&#x6D;&#x61;&#105;&#x6C;&#x74;&#111;:&#x63;&#x6F;&#x75;&#x63;&#104;&#x64;&#x62;&#45;&#x75;&#x73;&#x65;&#114;&#45;&#x73;&#x75;&#x62;&#115;&#99;&#114;&#x69;&#98;&#101;&#64;&#x69;&#110;&#x63;&#117;&#x62;&#x61;&#116;&#111;r&#x2E;&#97;&#x70;&#97;&#x63;&#x68;&#x65;&#46;&#x6F;&#x72;&#x67;">&#x63;&#x6F;&#x75;&#x63;&#104;&#x64;&#x62;&#45;&#x75;&#x73;&#x65;&#114;&#45;&#x73;&#x75;&#x62;&#115;&#99;&#114;&#x69;&#98;&#101;&#64;&#x69;&#110;&#x63;&#117;&#x62;&#x61;&#116;&#111;r&#x2E;&#97;&#x70;&#97;&#x63;&#x68;&#x65;&#46;&#x6F;&#x72;&#x67;</a>.</li>
+<a href="&#x6D;&#x61;&#105;l&#116;&#111;:&#x63;&#x6F;u&#x63;&#x68;&#100;&#98;&#x2D;u&#115;&#x65;&#x72;&#45;&#115;&#117;&#x62;&#x73;&#x63;&#x72;&#105;&#98;&#101;&#64;&#105;&#x6E;&#99;&#117;&#98;&#x61;&#x74;&#x6F;&#114;&#46;&#x61;&#112;&#97;&#x63;&#104;&#x65;&#46;&#x6F;&#114;&#103;">&#x63;&#x6F;u&#x63;&#x68;&#100;&#98;&#x2D;u&#115;&#x65;&#x72;&#45;&#115;&#117;&#x62;&#x73;&#x63;&#x72;&#105;&#98;&#101;&#64;&#105;&#x6E;&#99;&#117;&#98;&#x61;&#x74;&#x6F;&#114;&#46;&#x61;&#112;&#97;&#x63;&#104;&#x65;&#46;&#x6F;&#114;&#103;</a>.</li>
 <li>To <strong>unsubscribe</strong> send empty email to
-<a href="&#x6D;&#97;&#105;&#x6C;&#116;&#x6F;:&#x63;&#x6F;&#x75;&#99;&#x68;&#x64;&#x62;&#45;&#117;&#115;&#x65;&#x72;&#45;&#x75;&#110;&#x73;&#117;&#x62;&#115;&#99;&#114;&#x69;b&#101;&#64;&#105;&#x6E;&#x63;&#117;&#x62;&#x61;&#x74;&#111;&#114;&#46;&#x61;&#112;&#97;&#x63;&#x68;e&#x2E;&#x6F;&#x72;&#x67;">&#x63;&#x6F;&#x75;&#99;&#x68;&#x64;&#x62;&#45;&#117;&#115;&#x65;&#x72;&#45;&#x75;&#110;&#x73;&#117;&#x62;&#115;&#99;&#114;&#x69;b&#101;&#64;&#105;&#x6E;&#x63;&#117;&#x62;&#x61;&#x74;&#111;&#114;&#46;&#x61;&#112;&#97;&#x63;&#x68;e&#x2E;&#x6F;&#x72;&#x67;</a></li>
+<a href="&#109;a&#x69;&#x6C;&#x74;o:&#99;o&#x75;&#99;&#x68;&#100;b&#x2D;&#117;&#115;&#x65;&#114;&#45;&#117;&#110;&#115;&#x75;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#110;c&#x75;&#x62;&#x61;&#116;&#x6F;&#114;&#x2E;&#x61;&#112;&#x61;&#x63;&#104;&#101;&#x2E;&#x6F;r&#x67;">&#99;o&#x75;&#99;&#x68;&#100;b&#x2D;&#117;&#115;&#x65;&#114;&#45;&#117;&#110;&#115;&#x75;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#110;c&#x75;&#x62;&#x61;&#116;&#x6F;&#114;&#x2E;&#x61;&#112;&#x61;&#x63;&#104;&#101;&#x2E;&#x6F;r&#x67;</a></li>
 <li>Finally, to post a message to the list use the address
-<a href="&#x6D;&#97;&#x69;&#108;&#x74;&#111;:&#x63;&#111;uc&#x68;&#x64;&#98;&#x2D;&#x75;&#115;&#101;&#114;&#64;&#x69;&#110;c&#x75;&#98;a&#116;&#111;&#114;&#x2E;&#97;&#112;&#97;&#x63;&#104;&#x65;&#x2E;&#111;&#x72;&#x67;">&#x63;&#111;uc&#x68;&#x64;&#98;&#x2D;&#x75;&#115;&#101;&#114;&#64;&#x69;&#110;c&#x75;&#98;a&#116;&#111;&#114;&#x2E;&#97;&#112;&#97;&#x63;&#104;&#x65;&#x2E;&#111;&#x72;&#x67;</a></li>
+<a href="&#109;&#97;&#x69;&#x6C;&#x74;&#111;:&#99;&#x6F;&#117;&#99;&#104;&#x64;&#98;&#45;&#117;&#115;&#x65;&#114;&#64;&#105;&#110;&#99;&#x75;&#98;&#97;&#116;&#x6F;&#114;.&#97;p&#x61;&#x63;&#104;&#101;&#x2E;&#x6F;&#x72;&#103;">&#99;&#x6F;&#117;&#99;&#104;&#x64;&#98;&#45;&#117;&#115;&#x65;&#114;&#64;&#105;&#110;&#99;&#x75;&#98;&#97;&#116;&#x6F;&#114;.&#97;p&#x61;&#x63;&#104;&#101;&#x2E;&#x6F;&#x72;&#103;</a></li>
 </ul>
 
 <p>The archives for this list can also be <a href="http://mail-archives.apache.org/mod_mbox/incubator-couchdb-user/">browsed online</a>.</p>
@@ -105,11 +105,11 @@
 
 <ul>
 <li>To <strong>subscribe</strong>, send an email to
-<a href="&#109;&#97;i&#x6C;&#x74;&#x6F;:&#x63;&#111;&#117;&#99;&#104;&#x64;&#x62;&#45;d&#101;&#118;&#45;&#115;&#117;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#x6E;c&#x75;&#x62;&#97;&#x74;&#x6F;&#114;&#46;&#x61;&#x70;&#x61;c&#x68;e.&#111;&#114;g">&#x63;&#111;&#117;&#99;&#104;&#x64;&#x62;&#45;d&#101;&#118;&#45;&#115;&#117;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#x6E;c&#x75;&#x62;&#97;&#x74;&#x6F;&#114;&#46;&#x61;&#x70;&#x61;c&#x68;e.&#111;&#114;g</a>.</li>
+<a href="m&#97;&#x69;&#x6C;&#x74;&#111;:&#99;&#x6F;&#117;&#99;&#104;&#x64;&#98;&#x2D;&#x64;&#101;&#118;&#x2D;&#115;&#117;&#98;&#115;&#99;&#114;&#x69;&#98;&#101;&#64;&#x69;&#110;c&#x75;&#98;&#x61;&#116;&#x6F;&#114;&#x2E;&#97;&#112;&#x61;&#x63;&#104;e.&#111;r&#103;">&#99;&#x6F;&#117;&#99;&#104;&#x64;&#98;&#x2D;&#x64;&#101;&#118;&#x2D;&#115;&#117;&#98;&#115;&#99;&#114;&#x69;&#98;&#101;&#64;&#x69;&#110;c&#x75;&#98;&#x61;&#116;&#x6F;&#114;&#x2E;&#97;&#112;&#x61;&#x63;&#104;e.&#111;r&#103;</a>.</li>
 <li>To <strong>unsubscribe</strong> send empty email to
-<a href="&#109;&#97;&#105;&#x6C;&#x74;&#x6F;:&#x63;&#111;&#117;&#99;&#104;&#x64;b&#x2D;&#x64;&#101;&#118;&#45;u&#110;&#x73;&#x75;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#x6E;&#x63;&#117;&#98;&#x61;&#116;&#111;&#114;.a&#112;&#97;&#x63;&#104;&#x65;&#46;&#x6F;&#114;&#103;">&#x63;&#111;&#117;&#99;&#104;&#x64;b&#x2D;&#x64;&#101;&#118;&#45;u&#110;&#x73;&#x75;&#98;&#x73;&#x63;&#114;&#x69;&#98;&#101;&#64;&#105;&#x6E;&#x63;&#117;&#98;&#x61;&#116;&#111;&#114;.a&#112;&#97;&#x63;&#104;&#x65;&#46;&#x6F;&#114;&#103;</a></li>
+<a href="&#109;&#97;&#105;&#x6C;&#116;&#111;:&#99;&#111;&#x75;&#99;&#104;&#x64;b&#x2D;&#x64;&#x65;v&#x2D;&#117;&#110;s&#x75;&#98;&#x73;&#99;&#114;&#105;&#x62;&#101;&#64;&#105;&#x6E;&#99;&#x75;&#x62;&#97;&#x74;&#x6F;&#114;&#x2E;&#x61;&#x70;&#97;&#x63;&#x68;&#x65;&#46;&#111;&#114;&#x67;">&#99;&#111;&#x75;&#99;&#104;&#x64;b&#x2D;&#x64;&#x65;v&#x2D;&#117;&#110;s&#x75;&#98;&#x73;&#99;&#114;&#105;&#x62;&#101;&#64;&#105;&#x6E;&#99;&#x75;&#x62;&#97;&#x74;&#x6F;&#114;&#x2E;&#x61;&#x70;&#97;&#x63;&#x68;&#x65;&#46;&#111;&#114;&#x67;</a></li>
 <li>Finally, to post a message to the list use the address
-<a href="&#109;&#x61;&#105;&#x6C;&#x74;&#x6F;:c&#111;&#117;c&#x68;&#100;&#x62;&#x2D;&#x64;&#x65;&#118;&#64;in&#x63;&#117;&#x62;&#97;&#116;&#111;r.&#97;&#112;&#x61;&#99;&#x68;&#101;.&#111;&#x72;&#103;">c&#111;&#117;c&#x68;&#100;&#x62;&#x2D;&#x64;&#x65;&#118;&#64;in&#x63;&#117;&#x62;&#97;&#116;&#111;r.&#97;&#112;&#x61;&#99;&#x68;&#101;.&#111;&#x72;&#103;</a></li>
+<a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#x63;&#111;&#117;&#x63;&#x68;&#100;&#x62;&#45;&#100;&#x65;&#x76;&#64;&#x69;n&#x63;&#x75;&#98;&#x61;&#x74;&#x6F;&#x72;&#x2E;&#x61;&#112;&#x61;&#x63;&#104;&#101;.&#111;&#x72;&#x67;">&#x63;&#111;&#117;&#x63;&#x68;&#100;&#x62;&#45;&#100;&#x65;&#x76;&#64;&#x69;n&#x63;&#x75;&#98;&#x61;&#x74;&#x6F;&#x72;&#x2E;&#x61;&#112;&#x61;&#x63;&#104;&#101;.&#111;&#x72;&#x67;</a></li>
 </ul>
 
 <p>The archives for this list can also be <a href="http://mail-archives.apache.org/mod_mbox/incubator-couchdb-dev/">browsed online</a>.</p>
@@ -122,9 +122,9 @@
 
 <ul>
 <li>To <strong>subscribe</strong>, send an email to
-<a href="&#109;&#97;&#105;l&#116;&#x6F;:&#99;&#111;&#117;&#99;&#x68;&#x64;&#98;&#x2D;&#99;&#x6F;&#109;mit&#115;&#45;&#115;&#x75;&#x62;&#x73;&#x63;r&#105;&#x62;&#101;&#64;&#105;&#110;&#x63;&#x75;b&#x61;&#116;&#111;&#x72;&#x2E;&#x61;&#x70;&#97;&#x63;&#x68;e.&#111;&#x72;&#103;">&#99;&#111;&#117;&#99;&#x68;&#x64;&#98;&#x2D;&#99;&#x6F;&#109;mit&#115;&#45;&#115;&#x75;&#x62;&#x73;&#x63;r&#105;&#x62;&#101;&#64;&#105;&#110;&#x63;&#x75;b&#x61;&#116;&#111;&#x72;&#x2E;&#x61;&#x70;&#97;&#x63;&#x68;e.&#111;&#x72;&#103;</a>.</li>
+<a href="&#x6D;&#97;&#105;&#108;&#116;&#111;:&#99;&#x6F;&#117;&#99;&#104;&#x64;&#x62;&#45;&#99;&#x6F;&#x6D;&#x6D;&#105;t&#x73;&#x2D;&#115;&#117;&#98;&#115;c&#114;&#105;&#x62;&#x65;&#64;&#x69;&#110;&#x63;&#x75;&#x62;&#x61;&#x74;&#x6F;&#114;&#x2E;&#97;&#112;&#97;&#99;&#104;&#x65;&#x2E;&#111;&#x72;&#103;">&#99;&#x6F;&#117;&#99;&#104;&#x64;&#x62;&#45;&#99;&#x6F;&#x6D;&#x6D;&#105;t&#x73;&#x2D;&#115;&#117;&#98;&#115;c&#114;&#105;&#x62;&#x65;&#64;&#x69;&#110;&#x63;&#x75;&#x62;&#x61;&#x74;&#x6F;&#114;&#x2E;&#97;&#112;&#97;&#99;&#104;&#x65;&#x2E;&#111;&#x72;&#103;</a>.</li>
 <li>To <strong>unsubscribe</strong> send empty email to
-<a href="&#x6D;a&#105;&#108;t&#111;:c&#111;&#117;&#x63;h&#x64;&#98;&#x2D;&#99;&#x6F;&#109;&#109;&#105;&#116;&#115;&#45;&#117;n&#115;&#117;&#x62;&#x73;&#x63;&#x72;&#105;b&#x65;&#64;&#105;&#110;&#99;&#x75;&#98;&#x61;t&#111;&#x72;&#46;&#97;&#112;&#97;&#99;&#104;&#x65;&#46;&#111;r&#103;">c&#111;&#117;&#x63;h&#x64;&#98;&#x2D;&#99;&#x6F;&#109;&#109;&#105;&#116;&#115;&#45;&#117;n&#115;&#117;&#x62;&#x73;&#x63;&#x72;&#105;b&#x65;&#64;&#105;&#110;&#99;&#x75;&#98;&#x61;t&#111;&#x72;&#46;&#97;&#112;&#97;&#99;&#104;&#x65;&#46;&#111;r&#103;</a></li>
+<a href="&#109;&#97;i&#x6C;&#116;&#111;:&#x63;&#x6F;u&#x63;h&#100;b&#45;&#x63;&#x6F;&#x6D;&#x6D;&#105;&#116;&#115;&#45;&#117;&#x6E;&#x73;&#x75;&#x62;&#x73;c&#114;&#105;&#98;&#101;&#64;&#x69;&#x6E;&#x63;&#x75;&#98;&#97;&#x74;o&#x72;&#46;&#97;p&#x61;ch&#x65;&#46;&#111;r&#x67;">&#x63;&#x6F;u&#x63;h&#100;b&#45;&#x63;&#x6F;&#x6D;&#x6D;&#105;&#116;&#115;&#45;&#117;&#x6E;&#x73;&#x75;&#x62;&#x73;c&#114;&#105;&#98;&#101;&#64;&#x69;&#x6E;&#x63;&#x75;&#98;&#97;&#x74;o&#x72;&#46;&#97;p&#x61;ch&#x65;&#46;&#111;r&#x67;</a></li>
 </ul>
 
 <p>Replies to commit mails should be directed to the <code>couchdb-dev</code> mailing list.</p>

Modified: incubator/couchdb/site/htdocs/community/standards.html
URL: http://svn.apache.org/viewvc/incubator/couchdb/site/htdocs/community/standards.html?rev=662860&r1=662859&r2=662860&view=diff
==============================================================================
--- incubator/couchdb/site/htdocs/community/standards.html (original)
+++ incubator/couchdb/site/htdocs/community/standards.html Tue Jun  3 12:12:23 2008
@@ -69,6 +69,28 @@
 </ul>
 </div>
       <div id="content"><h1>Coding Standards</h1>
+
+<p>CouchDB comes with code in a variety of different languages. While the core is
+written in Erlang, there are some parts written in C, others written in HTML,
+CSS, and Javascript, and then there are also shell scripts, Makefiles, et
+cetera.</p>
+
+<p>First, some general rules:</p>
+
+<ul>
+<li>Always use spaces for indentation, not tabs, except in Makefiles.</li>
+<li>Use four spaces for indentation in Erlang and C code, two spaces in HTML,
+CSS, and Javascript.</li>
+<li>Try to keep lines shorter than 80 characters.</li>
+<li>When you edit a file, try to stick with the conventions used in the
+surrounding code.</li>
+<li>Avoid mixing purely cosmetic changes (such as removing trailing white-space)
+with functional changes, as that makes review of the actual change (whether
+it&#8217;s a check-in or a patch) much more difficult.</li>
+</ul>
+
+<p>For more detailed coding conventions for Erlang code, please see the <a href="http://www.erlang.se/doc/programming_rules.shtml">Erlang
+Programming Rules and Conventions</a>.</p>
 <div id="clear"></div></div>
     </div></div>
     <div id="footer">

Modified: incubator/couchdb/site/htdocs/community/standards.txt
URL: http://svn.apache.org/viewvc/incubator/couchdb/site/htdocs/community/standards.txt?rev=662860&r1=662859&r2=662860&view=diff
==============================================================================
--- incubator/couchdb/site/htdocs/community/standards.txt (original)
+++ incubator/couchdb/site/htdocs/community/standards.txt Tue Jun  3 12:12:23 2008
@@ -4,3 +4,23 @@
 
 %(title)s
 =========
+
+CouchDB comes with code in a variety of different languages. While the core is
+written in Erlang, there are some parts written in C, others written in HTML,
+CSS, and Javascript, and then there are also shell scripts, Makefiles, et
+cetera.
+
+First, some general rules:
+
+ * Always use spaces for indentation, not tabs, except in Makefiles.
+ * Use four spaces for indentation in Erlang and C code, two spaces in HTML,
+   CSS, and Javascript.
+ * Try to keep lines shorter than 80 characters.
+ * When you edit a file, try to stick with the conventions used in the
+   surrounding code.
+ * Avoid mixing purely cosmetic changes (such as removing trailing white-space)
+   with functional changes, as that makes review of the actual change (whether
+   it's a check-in or a patch) much more difficult.
+
+For more detailed coding conventions for Erlang code, please see the [Erlang
+Programming Rules and Conventions](http://www.erlang.se/doc/programming_rules.shtml).