Dear wiki user, You have subscribed to a wiki page "Couchdb Wiki" for change notification.
The page "Coding_Standards" has been deleted by JoanTouzet: https://wiki.apache.org/couchdb/Coding_Standards?action=diff&rev1=4&rev2=5 Comment: Outdated, unfortunately. We need a new one of these. - 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: - - 1. Always use spaces for indentation, not tabs, except in Makefiles. - 1. Use four spaces for indentation in Erlang and C code, two spaces in HTML, CSS, and Javascript. - 1. Try to keep lines shorter than 80 characters. - 1. When you edit a file, try to stick with the conventions used in the surrounding code. - 1. Avoid trailing spaces and newlines in your files. Good editors usually have a configuration option that prevents this from happening. - 1. 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 [[http://www.erlang.se/doc/programming_rules.shtml|Erlang Programming Rules and Conventions]]. -