Repository: spark-website
Updated Branches:
  refs/heads/asf-site b3d3882db -> 4762eb4c2


Doc for [SPARK-26177] Automated formatting for Scala code

Docs for https://github.com/apache/spark/pull/23148

Author: cody koeninger <c...@koeninger.org>

Closes #159 from koeninger/scalafmt.


Project: http://git-wip-us.apache.org/repos/asf/spark-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark-website/commit/4762eb4c
Tree: http://git-wip-us.apache.org/repos/asf/spark-website/tree/4762eb4c
Diff: http://git-wip-us.apache.org/repos/asf/spark-website/diff/4762eb4c

Branch: refs/heads/asf-site
Commit: 4762eb4c213111c5cd89ed764cbbb4c03425f1ff
Parents: b3d3882
Author: cody koeninger <c...@koeninger.org>
Authored: Thu Nov 29 11:23:36 2018 -0600
Committer: Sean Owen <sean.o...@databricks.com>
Committed: Thu Nov 29 11:23:36 2018 -0600

----------------------------------------------------------------------
 contributing.md           |  2 +-
 developer-tools.md        | 10 ++++++++++
 site/contributing.html    |  2 +-
 site/developer-tools.html |  9 +++++++++
 4 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark-website/blob/4762eb4c/contributing.md
----------------------------------------------------------------------
diff --git a/contributing.md b/contributing.md
index fd1878f..2d26645 100644
--- a/contributing.md
+++ b/contributing.md
@@ -402,7 +402,7 @@ lower case latter and S4 objects/methods are allowed.
 Many Scala guidelines below also apply to Java.
 - For Scala code, Apache Spark follows the official 
 <a href="http://docs.scala-lang.org/style/";>Scala style guide</a> and
-<a href="https://github.com/databricks/scala-style-guide";>Databricks Scala 
guide</a>. The latter is preferred.
+<a href="https://github.com/databricks/scala-style-guide";>Databricks Scala 
guide</a>. The latter is preferred. To format Scala code, run ./dev/scalafmt 
prior to submitting a PR.
 
 <h3>If in Doubt</h3>
 

http://git-wip-us.apache.org/repos/asf/spark-website/blob/4762eb4c/developer-tools.md
----------------------------------------------------------------------
diff --git a/developer-tools.md b/developer-tools.md
index c975e80..d8900ee 100644
--- a/developer-tools.md
+++ b/developer-tools.md
@@ -263,6 +263,16 @@ You can use a <a 
href="https://plugins.jetbrains.com/plugin/7350";>IntelliJ Impor
 from Aaron Davidson to help you organize the imports in 
 your code.  It can be configured to match the import ordering from the style 
guide.
 
+<h3>Formatting Code</h3>
+
+To format Scala code, run the following command prior to submitting a PR:
+
+```
+$ ./dev/scalafmt
+```
+
+By default, this script will format files that differ from git master. For 
more information, see <a href="https://scalameta.org/scalafmt/";>scalafmt 
documentation</a>, but use the existing script not a locally installed version 
of scalafmt.
+
 <h3>IDE Setup</h3>
 
 <h4>IntelliJ</h4>

http://git-wip-us.apache.org/repos/asf/spark-website/blob/4762eb4c/site/contributing.html
----------------------------------------------------------------------
diff --git a/site/contributing.html b/site/contributing.html
index 908f1ba..a817e0f 100644
--- a/site/contributing.html
+++ b/site/contributing.html
@@ -657,7 +657,7 @@ lower case latter and S4 objects/methods are allowed.</li>
 Many Scala guidelines below also apply to Java.</li>
   <li>For Scala code, Apache Spark follows the official 
 <a href="http://docs.scala-lang.org/style/";>Scala style guide</a> and
-<a href="https://github.com/databricks/scala-style-guide";>Databricks Scala 
guide</a>. The latter is preferred.</li>
+<a href="https://github.com/databricks/scala-style-guide";>Databricks Scala 
guide</a>. The latter is preferred. To format Scala code, run ./dev/scalafmt 
prior to submitting a PR.</li>
 </ul>
 
 <h3>If in Doubt</h3>

http://git-wip-us.apache.org/repos/asf/spark-website/blob/4762eb4c/site/developer-tools.html
----------------------------------------------------------------------
diff --git a/site/developer-tools.html b/site/developer-tools.html
index 56706ac..040a948 100644
--- a/site/developer-tools.html
+++ b/site/developer-tools.html
@@ -439,6 +439,15 @@ $ build/mvn dependency:tree
 from Aaron Davidson to help you organize the imports in 
 your code.  It can be configured to match the import ordering from the style 
guide.</p>
 
+<h3>Formatting Code</h3>
+
+<p>To format Scala code, run the following command prior to submitting a 
PR:</p>
+
+<pre><code>$ ./dev/scalafmt
+</code></pre>
+
+<p>By default, this script will format files that differ from git master. For 
more information, see <a href="https://scalameta.org/scalafmt/";>scalafmt 
documentation</a>, but use the existing script not a locally installed version 
of scalafmt.</p>
+
 <h3>IDE Setup</h3>
 
 <h4>IntelliJ</h4>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to