You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ni...@apache.org on 2014/07/24 21:10:20 UTC

svn commit: r1613248 - in /tika/site: publish/contribute.html src/site/apt/contribute.apt

Author: nick
Date: Thu Jul 24 19:10:19 2014
New Revision: 1613248

URL: http://svn.apache.org/r1613248
Log:
Following discussions on the dev list, add a little bit about current code formatting guidelines

Modified:
    tika/site/publish/contribute.html
    tika/site/src/site/apt/contribute.apt

Modified: tika/site/publish/contribute.html
URL: http://svn.apache.org/viewvc/tika/site/publish/contribute.html?rev=1613248&r1=1613247&r2=1613248&view=diff
==============================================================================
--- tika/site/publish/contribute.html (original)
+++ tika/site/publish/contribute.html Thu Jul 24 19:10:19 2014
@@ -114,6 +114,11 @@
 <p>Any new dependencies introduced must be under a suitable license. Broadly, they must be Open Source, and must not place restrictions on larger works they are incorporated within. A list of the allowed licenses is maintained by the <a class="externalLink" href="http://www.apache.org/legal/resolved.html">ASF Legal Affairs Committee</a>. If in doubt, check on the dev list.</p>
 <p>All new and updated dependencies must be in Maven Central. (It is not possible for Apache releases to depend on additional repositories in their poms). If possible, the project producing the dependency should be asked to publish it to Central, such as through the <a class="externalLink" href="https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide">Sonatype OSS Maven Repo</a>. If that isn't possible, someone will need to upload it via the <a class="externalLink" href="https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+The+Central+Repository">Sonatype 3rd Party OSS Artifacts process</a>. This will need to be completed before any patches depending on the new library can be committed to Tika.</p></div>
 <div class="section">
+<h2>Code Formatting<a name="Code_Formatting"></a></h2>
+<p>Java code should be indented with 4 spaces, no tabs. Opening brackets should normally be on the same line as the statement. Java coding standards are normally followed, but if in doubt follow what the existing code does!</p>
+<p>Imports should normally be explicit, wildcard (foo.*) imports should not normally be used.</p>
+<p>From time to time, you may find that code you are working on doesn't follow these rules. If you find that, please don't submit a single patch with logic changes + formatting together, as those are very hard to review. Instead, please submit two patches, one to correct formatting problems, and a second for your logic changes / fixes.</p></div>
+<div class="section">
 <h2>Other Resources<a name="Other_Resources"></a></h2>
 <ul>
 <li>The <a class="externalLink" href="http://community.apache.org/">Apache Community Development project (ComDev)</a> provide general advice on getting started with contributing to Apache projects</li>

Modified: tika/site/src/site/apt/contribute.apt
URL: http://svn.apache.org/viewvc/tika/site/src/site/apt/contribute.apt?rev=1613248&r1=1613247&r2=1613248&view=diff
==============================================================================
--- tika/site/src/site/apt/contribute.apt (original)
+++ tika/site/src/site/apt/contribute.apt Thu Jul 24 19:10:19 2014
@@ -120,6 +120,22 @@ Dependencies
    This will need to be completed before any patches depending on the
    new library can be committed to Tika.
 
+Code Formatting
+
+   Java code should be indented with 4 spaces, no tabs. Opening brackets
+   should normally be on the same line as the statement. Java coding 
+   standards are normally followed, but if in doubt follow what the
+   existing code does!
+
+   Imports should normally be explicit, wildcard (foo.*) imports should
+   not normally be used.
+
+   From time to time, you may find that code you are working on doesn't
+   follow these rules. If you find that, please don't submit a single
+   patch with logic changes + formatting together, as those are very hard
+   to review. Instead, please submit two patches, one to correct formatting
+   problems, and a second for your logic changes / fixes.
+
 Other Resources
 
    * The {{{http://community.apache.org/}Apache Community Development