From: William Victor Mote Date: Thu, 16 Oct 2003 16:50:13 +0000 (+0000) Subject: update code conventions from resolved issues on the FOPDevelopersStyleGuide wiki X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1051 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=708000184e3680b1f8a69385b9bcdf26d2865976;p=xmlgraphics-fop.git update code conventions from resolved issues on the FOPDevelopersStyleGuide wiki git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196963 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/dev/conventions.xml b/src/documentation/content/xdocs/dev/conventions.xml index 12063b953..d6bfb5362 100644 --- a/src/documentation/content/xdocs/dev/conventions.xml +++ b/src/documentation/content/xdocs/dev/conventions.xml @@ -20,7 +20,7 @@ Java
Java Style -

In order to facilitate the human reading of FOP source code, the FOP developers have agreed on a set of coding conventions. +

In order to facilitate the human reading of FOP source code, reduce churning in code, and prevent disputes, the FOP developers have agreed on a set of coding conventions. The basis of these coding conventions is documented in the Apache XML Project Guidelines, which requires that all Java Language source code in the repository must be written in conformance to Sun's Code Conventions for the Java Programming Language. In addition, the FOP developers have agreed to other conventions, which are summarized in the following table:

@@ -35,20 +35,27 @@ In addition, the FOP developers have agreed to other conventions, which are summ - + - + - + + + + + + @@ -69,6 +76,14 @@ In addition, the FOP developers have agreed to other conventions, which are summ + + + + +
checkstyle
No tabs in contentNo tabs in content. Programmers should not have to adjust the tab settings in their editor to be able to read the source code. checkstyle
Indentation of 4 spaces per levelIndentation of 4 spaces per level. Maximize readability. Not enforced
Comments must be in EnglishComments, identifiers, and project documentation must be in English. +In general, other languages must not be used, except in translated documentation and language-specific i10n files. + To avoid the need for everyone to learn all languages, English has become the standard language for many technology projects, and is the only human language that all FOP developers are expected to know. Not enforced
American English spelling should be used. Alternative spelling and idioms are tolerated, but may be changed by anyone to American.Some standard is useful, and American English is widely used and accepted for technology standards and projects.Not enforced.
Fully qualify all import statements (no "import java.util.*") ClarityBasic API documentation is needed. checkstyle
Personal attribution in the source code, such as @author tags and attribution comments should not be used. +Excepted from this general rule are potentially confusing or wide-ranging changes. +If such changes prove useful over time, the related comments should be removed.Personal attribution tends to clutter the code. +The relevant historical information that might be useful for problem-solving is tracked in the code repository.Not enforced. Anyone is free to remove such comments.

For developers that dislike these conventions, one workaround is to develop using their own style, then use a formatting tool like astyle (Artistic Style) before committing.