You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/11/19 16:40:00 UTC
svn commit: r1203996 -
/incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext
Author: joern
Date: Sat Nov 19 15:40:00 2011
New Revision: 1203996
URL: http://svn.apache.org/viewvc?rev=1203996&view=rev
Log:
OPENNLP-23 Added code convetions pages, work is derived from Apache UIMA
Added:
incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext (with props)
Added: incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext
URL: http://svn.apache.org/viewvc/incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext?rev=1203996&view=auto
==============================================================================
--- incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext (added)
+++ incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext Sat Nov 19 15:40:00 2011
@@ -0,0 +1,31 @@
+Title: Apache OpenNLP Code Conventions
+
+The Apache OpenNLP code should follow our code conventions. All code which
+is contributed to the project should adhere to these guidelines.
+
+* Use 2 spaces for indentation. No tabs!
+* Place open braces on the same line as the declaration, for example:
+<pre><code>
+public class Foo extends Bar {
+ public static void main(String args[]) {
+ try {
+ for (int i = 0; i < args.length; i++) {
+ System.out.println(Integer.parseInt(args[i]));
+ }
+ }
+ catch(NumberFormatException e) {
+ e.printStackTrace();
+ }
+ }
+}
+</code></pre>
+* Wrap lines longer than 80 to 100 characters. For wrapped lines use an indent of 8 characters.
+* Within a class or interface, definitions should be ordered as follows:
+1. Inner classses
+2. Class (static) variables
+3. Instance variables
+4. Constructors
+5. Methods
+
+* Do not use package imports (for example import org.apache.opennlp.*)
+* For other cases, we try to follow Java code conventions as much as possible: see http://www.oracle.com/technetwork/java/codeconv-138413.html
\ No newline at end of file
Propchange: incubator/opennlp/site/trunk/content/opennlp/code-conventions.mdtext
------------------------------------------------------------------------------
svn:eol-style = native