You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2017/03/14 20:59:35 UTC
[1/3] beam-site git commit: [BEAM-1652] Code style instructions for
IntelliJ in contribution guide.
Repository: beam-site
Updated Branches:
refs/heads/asf-site 6a5d39b04 -> 7407f66b5
[BEAM-1652] Code style instructions for IntelliJ in contribution guide.
[BEAM-1652] Code style instructions for Eclipse in contribution guide.
Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/b91ee7d6
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/b91ee7d6
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/b91ee7d6
Branch: refs/heads/asf-site
Commit: b91ee7d68b33f5b636b2333163736baf29e5c625
Parents: 6a5d39b
Author: Zur, Aviem <az...@paypal.com>
Authored: Tue Mar 14 07:43:29 2017 +0200
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Mar 14 13:58:59 2017 -0700
----------------------------------------------------------------------
src/contribute/contribution-guide.md | 37 +++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam-site/blob/b91ee7d6/src/contribute/contribution-guide.md
----------------------------------------------------------------------
diff --git a/src/contribute/contribution-guide.md b/src/contribute/contribution-guide.md
index 3bff89e..b2af352 100644
--- a/src/contribute/contribution-guide.md
+++ b/src/contribute/contribution-guide.md
@@ -143,11 +143,24 @@ clicking the "Check Module" button. The scan should report no errors.
Note: Selecting "Check Project" may report some errors from the archetype
modules as they are not configured for Checkstyle validation.
+###### Code Style
+IntelliJ supports code styles within the IDE. Use one of the following to ensure your code style
+matches the project's checkstyle enforcements.
+
+1. (Option 1) Configure IntelliJ to use "beam-codestyle.xml".
+ 1. Go to Settings -> Code Style -> Java.
+ 1. Click the cogwheel icon next to 'Scheme' and select Import Scheme -> Eclipse XML Profile.
+ 1. Select "sdks/java/build-tools/src/main/resources/beam/beam-codestyle.xml".
+ 1. Click "OK".
+ 1. Click "Apply" and "OK".
+1. (Option 2) Install [Google Java Format plugin](https://plugins.jetbrains.com/plugin/8527-google-java-format).
+
##### Eclipse
-Use a recent eclipse version that includes m2e. Currently we recommend Eclipse Neon.
-Start eclipse with a fresh workspace in a separate directory from your checkout.
+Use a recent Eclipse version that includes m2e. Currently we recommend Eclipse Neon.
+Start Eclipse with a fresh workspace in a separate directory from your checkout.
+###### Initial setup
1. Install m2e-apt: Beam uses apt annotation processing to provide auto generated code. One example is the usage of [Google AutoValue](https://github.com/google/auto/tree/master/value). By default m2e does not support this and you will see compile errors.
Help
@@ -175,6 +188,26 @@ Start eclipse with a fresh workspace in a separate directory from your checkout.
You now should have all the beam projects imported into eclipse and should see no compile errors.
+###### Checkstyle
+Eclipse supports checkstyle within the IDE using the Checkstyle plugin.
+
+1. Install the [Checkstyle plugin](https://marketplace.eclipse.org/content/checkstyle-plug).
+1. Configure Checkstyle plugin by going to Preferences - Checkstyle.
+ 1. Click "New...".
+ 1. Select "External Configuration File" for type.
+ 1. Click "Browse..." and select "sdks/java/build-tools/src/main/resources/beam/checkstyle.xml".
+ 1. Enter "Beam Checks" under "Name:".
+ 1. Click "OK", then "OK".
+
+###### Code Style
+Eclipse supports code styles within the IDE. Use one of the following to ensure your code style
+matches the project's checkstyle enforcements.
+
+1. (Option 1) Configure Eclipse to use "beam-codestyle.xml".
+ 1. Go to Preferences -> Java -> Code Style -> Formatter.
+ 1. Click "Import..." and select "sdks/java/build-tools/src/main/resources/beam/beam-codestyle.xml".
+ 1. Click "Apply" and "OK".
+1. (Option 2) Install [Google Java Format plugin](https://github.com/google/google-java-format#eclipse).
### Create a branch in your fork
You\u2019ll work on your contribution in a branch in your own (forked) repository. Create a local branch, initialized with the state of the branch you expect your changes to be merged into. Keep in mind that we use several branches, including `master`, feature-specific, and release-specific branches. If you are unsure, initialize with the state of the `master` branch.
[3/3] beam-site git commit: This closes #177
Posted by da...@apache.org.
This closes #177
Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/7407f66b
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/7407f66b
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/7407f66b
Branch: refs/heads/asf-site
Commit: 7407f66b5e16096028c82cda8b52bcf39303c0e1
Parents: 6a5d39b b0ba36e
Author: Davor Bonaci <da...@google.com>
Authored: Tue Mar 14 13:59:26 2017 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Mar 14 13:59:26 2017 -0700
----------------------------------------------------------------------
.../contribute/contribution-guide/index.html | 61 +++++++++++++++++++-
src/contribute/contribution-guide.md | 37 +++++++++++-
2 files changed, 93 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
[2/3] beam-site git commit: Regenerate website
Posted by da...@apache.org.
Regenerate website
Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/b0ba36e5
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/b0ba36e5
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/b0ba36e5
Branch: refs/heads/asf-site
Commit: b0ba36e56d0c82567929550abab046386c87d7f1
Parents: b91ee7d
Author: Davor Bonaci <da...@google.com>
Authored: Tue Mar 14 13:59:25 2017 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Mar 14 13:59:25 2017 -0700
----------------------------------------------------------------------
.../contribute/contribution-guide/index.html | 61 +++++++++++++++++++-
1 file changed, 58 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam-site/blob/b0ba36e5/content/contribute/contribution-guide/index.html
----------------------------------------------------------------------
diff --git a/content/contribute/contribution-guide/index.html b/content/contribute/contribution-guide/index.html
index 92e009a..9663ea4 100644
--- a/content/contribute/contribution-guide/index.html
+++ b/content/contribute/contribution-guide/index.html
@@ -170,9 +170,15 @@
<li><a href="#intellij" id="markdown-toc-intellij">IntelliJ</a> <ul>
<li><a href="#enable-annotation-processing" id="markdown-toc-enable-annotation-processing">Enable Annotation Processing</a></li>
<li><a href="#checkstyle" id="markdown-toc-checkstyle">Checkstyle</a></li>
+ <li><a href="#code-style" id="markdown-toc-code-style">Code Style</a></li>
+ </ul>
+ </li>
+ <li><a href="#eclipse" id="markdown-toc-eclipse">Eclipse</a> <ul>
+ <li><a href="#initial-setup" id="markdown-toc-initial-setup">Initial setup</a></li>
+ <li><a href="#checkstyle-1" id="markdown-toc-checkstyle-1">Checkstyle</a></li>
+ <li><a href="#code-style-1" id="markdown-toc-code-style-1">Code Style</a></li>
</ul>
</li>
- <li><a href="#eclipse" id="markdown-toc-eclipse">Eclipse</a></li>
</ul>
</li>
</ul>
@@ -368,11 +374,29 @@ clicking the \u201cCheck Module\u201d button. The scan should report no errors.</p>
<p>Note: Selecting \u201cCheck Project\u201d may report some errors from the archetype
modules as they are not configured for Checkstyle validation.</p>
+<h6 id="code-style">Code Style</h6>
+<p>IntelliJ supports code styles within the IDE. Use one of the following to ensure your code style
+matches the project\u2019s checkstyle enforcements.</p>
+
+<ol>
+ <li>(Option 1) Configure IntelliJ to use \u201cbeam-codestyle.xml\u201d.
+ <ol>
+ <li>Go to Settings -> Code Style -> Java.</li>
+ <li>Click the cogwheel icon next to \u2018Scheme\u2019 and select Import Scheme -> Eclipse XML Profile.</li>
+ <li>Select \u201csdks/java/build-tools/src/main/resources/beam/beam-codestyle.xml\u201d.</li>
+ <li>Click \u201cOK\u201d.</li>
+ <li>Click \u201cApply\u201d and \u201cOK\u201d.</li>
+ </ol>
+ </li>
+ <li>(Option 2) Install <a href="https://plugins.jetbrains.com/plugin/8527-google-java-format">Google Java Format plugin</a>.</li>
+</ol>
+
<h5 id="eclipse">Eclipse</h5>
-<p>Use a recent eclipse version that includes m2e. Currently we recommend Eclipse Neon.
-Start eclipse with a fresh workspace in a separate directory from your checkout.</p>
+<p>Use a recent Eclipse version that includes m2e. Currently we recommend Eclipse Neon.
+Start Eclipse with a fresh workspace in a separate directory from your checkout.</p>
+<h6 id="initial-setup">Initial setup</h6>
<ol>
<li>
<p>Install m2e-apt: Beam uses apt annotation processing to provide auto generated code. One example is the usage of <a href="https://github.com/google/auto/tree/master/value">Google AutoValue</a>. By default m2e does not support this and you will see compile errors.</p>
@@ -406,6 +430,37 @@ Start eclipse with a fresh workspace in a separate directory from your checkout.
<p>You now should have all the beam projects imported into eclipse and should see no compile errors.</p>
+<h6 id="checkstyle-1">Checkstyle</h6>
+<p>Eclipse supports checkstyle within the IDE using the Checkstyle plugin.</p>
+
+<ol>
+ <li>Install the <a href="https://marketplace.eclipse.org/content/checkstyle-plug">Checkstyle plugin</a>.</li>
+ <li>Configure Checkstyle plugin by going to Preferences - Checkstyle.
+ <ol>
+ <li>Click \u201cNew\u2026\u201d.</li>
+ <li>Select \u201cExternal Configuration File\u201d for type.</li>
+ <li>Click \u201cBrowse\u2026\u201d and select \u201csdks/java/build-tools/src/main/resources/beam/checkstyle.xml\u201d.</li>
+ <li>Enter \u201cBeam Checks\u201d under \u201cName:\u201d.</li>
+ <li>Click \u201cOK\u201d, then \u201cOK\u201d.</li>
+ </ol>
+ </li>
+</ol>
+
+<h6 id="code-style-1">Code Style</h6>
+<p>Eclipse supports code styles within the IDE. Use one of the following to ensure your code style
+matches the project\u2019s checkstyle enforcements.</p>
+
+<ol>
+ <li>(Option 1) Configure Eclipse to use \u201cbeam-codestyle.xml\u201d.
+ <ol>
+ <li>Go to Preferences -> Java -> Code Style -> Formatter.</li>
+ <li>Click \u201cImport\u2026\u201d and select \u201csdks/java/build-tools/src/main/resources/beam/beam-codestyle.xml\u201d.</li>
+ <li>Click \u201cApply\u201d and \u201cOK\u201d.</li>
+ </ol>
+ </li>
+ <li>(Option 2) Install <a href="https://github.com/google/google-java-format#eclipse">Google Java Format plugin</a>.</li>
+</ol>
+
<h3 id="create-a-branch-in-your-fork">Create a branch in your fork</h3>
<p>You\u2019ll work on your contribution in a branch in your own (forked) repository. Create a local branch, initialized with the state of the branch you expect your changes to be merged into. Keep in mind that we use several branches, including <code class="highlighter-rouge">master</code>, feature-specific, and release-specific branches. If you are unsure, initialize with the state of the <code class="highlighter-rouge">master</code> branch.</p>