[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread koeninger
Github user koeninger commented on the issue:

https://github.com/apache/spark/pull/23148
  
Cool, opened with what I have so far, will keep an eye out for others for a 
while.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread srowen
Github user srowen commented on the issue:

https://github.com/apache/spark/pull/23148
  
Yeah we'd need a new PR. If you collect a few good improvements just open a 
follow up. I was testing by just making a dummy change in a few files and 
seeing what it did. It's OK as-is, even.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread shaneknapp
Github user shaneknapp commented on the issue:

https://github.com/apache/spark/pull/23148
  
> This is already useful in that we can just ask people to run dev/scalafmt 
(I'll update developer guids) as the output style looks _also_ just fine. I 
won't try to have this automatically add the formatting to the build.

yeah, i agree...  this might not be the right test to run during PR builds, 
but should be useful for local development.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread koeninger
Github user koeninger commented on the issue:

https://github.com/apache/spark/pull/23148
  
Just pushed a tweak to allow closing parens on same line.  New pr for that, 
or do we want to keep identifying other tweaks first?

I think the args on their own line is triggered once the line is longer 
than maxColumns.  There's an option for bin-packing argument lists, but seems 
like it's only for literal arguments and a few other cases, see 
https://scalameta.org/scalafmt/docs/configuration.html#binpackliteralargumentlists
  and 
https://github.com/scalameta/scalafmt/blob/08c6798a40188ce69b3287e3026becfbd540a847/scalafmt-core/shared/src/main/scala/org/scalafmt/config/BinPack.scala

I'm not aware of an option to only format the areas that the diff is in.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread srowen
Github user srowen commented on the issue:

https://github.com/apache/spark/pull/23148
  
I played with this a little locally, and yeah it does reformat entire files 
that are in the diff, and most of what it does is fixing stuff we probably 
wouldn't ask for in a PR review. For example is it possible to disable its 
preference for putting closing braces and parens on the next line? as in the 
comment at https://github.com/apache/spark/pull/23148#issuecomment-442243410 . 
And maybe less aggressive about putting args to a method each on their own 
line. 

There isn't a mode that would somehow just reformat lines that are being 
changed, BTW?

This is already useful in that we can just ask people to run dev/scalafmt 
(I'll update developer guids) as the output style looks _also_ just fine. I 
won't try to have this automatically add the formatting to the build.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread shaneknapp
Github user shaneknapp commented on the issue:

https://github.com/apache/spark/pull/23148
  
sgtm, i'll be more than happy to review once i get in to the office.  :)


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread srowen
Github user srowen commented on the issue:

https://github.com/apache/spark/pull/23148
  
Ah I see. I can add that call in a follow-up to enable it and see how we 
like it.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread shaneknapp
Github user shaneknapp commented on the issue:

https://github.com/apache/spark/pull/23148
  
i think the best place for this, imo, is in dev/run-tests.py (and called
via run-test-jenkins.py).

On Thu, Nov 29, 2018 at 6:56 AM Sean Owen  wrote:

> Merged to master. @shaneknapp  I think you
> can update the PR builder to call this now, if we're ready to give it a
> spin.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> , or 
mute
> the thread
> 

> .
>



---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-29 Thread srowen
Github user srowen commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged to master. @shaneknapp I think you can update the PR builder to call 
this now, if we're ready to give it a spin.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-27 Thread dbtsai
Github user dbtsai commented on the issue:

https://github.com/apache/spark/pull/23148
  
Thanks for testing it out. I personally like auto-formatting as my company 
projects are using scalafmt and we find it's very useful to keep consistent 
coding style. 


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-27 Thread koeninger
Github user koeninger commented on the issue:

https://github.com/apache/spark/pull/23148
  
I tested that example, it will reformat to

```
checkScan(
  query,
  
"struct,address:string,pets:int,"
 +
"friends:array>," +

"relatives:map>>"
)
```

but after that, it will not complain about the long unbreakable string 
starting with "struct".


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-27 Thread dbtsai
Github user dbtsai commented on the issue:

https://github.com/apache/spark/pull/23148
  
My concern is that let's say we have a code like the following which I 
copied from `ParquetSchemaPruningSuite.scala`; the scalafmt will complaint the 
second line is longer than 98 and reformat it. But this should be a legit 
coding style as many times, we are trying to put the code in one line for 
better readability. 

```scala
checkScan(query,
  
"struct,address:string,pets:int,"
 +
  "friends:array>," +
  
"relatives:map>>")
```


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99299/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99299 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99299/testReport)**
 for PR 23148 at commit 
[`92dd105`](https://github.com/apache/spark/commit/92dd105b4f2d3be2d2059f5a983dab01339e81a9).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99299 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99299/testReport)**
 for PR 23148 at commit 
[`92dd105`](https://github.com/apache/spark/commit/92dd105b4f2d3be2d2059f5a983dab01339e81a9).


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 

https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5382/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99290/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99290 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99290/testReport)**
 for PR 23148 at commit 
[`3cdafe0`](https://github.com/apache/spark/commit/3cdafe044d91aaf0de9064ddc053c85e58a471c4).
 * This patch passes all tests.
 * This patch merges cleanly.
 * This patch adds no public classes.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread koeninger
Github user koeninger commented on the issue:

https://github.com/apache/spark/pull/23148
  
Jenkins, retest this please


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test FAILed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99291/
Test FAILed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test FAILed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99291 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99291/testReport)**
 for PR 23148 at commit 
[`92dd105`](https://github.com/apache/spark/commit/92dd105b4f2d3be2d2059f5a983dab01339e81a9).
 * This patch **fails PySpark unit tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99291 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99291/testReport)**
 for PR 23148 at commit 
[`92dd105`](https://github.com/apache/spark/commit/92dd105b4f2d3be2d2059f5a983dab01339e81a9).


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 

https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5374/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 

https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5373/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99290 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99290/testReport)**
 for PR 23148 at commit 
[`3cdafe0`](https://github.com/apache/spark/commit/3cdafe044d91aaf0de9064ddc053c85e58a471c4).


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test FAILed.
Refer to this link for build results (access rights to CI server needed): 
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99288/
Test FAILed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99288 has 
finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99288/testReport)**
 for PR 23148 at commit 
[`bd7baec`](https://github.com/apache/spark/commit/bd7baeca577bf9b519fe028d1e831fb7193e7af9).
 * This patch **fails RAT tests**.
 * This patch merges cleanly.
 * This patch adds no public classes.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test FAILed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread SparkQA
Github user SparkQA commented on the issue:

https://github.com/apache/spark/pull/23148
  
**[Test build #99288 has 
started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99288/testReport)**
 for PR 23148 at commit 
[`bd7baec`](https://github.com/apache/spark/commit/bd7baeca577bf9b519fe028d1e831fb7193e7af9).


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Test PASSed.
Refer to this link for build results (access rights to CI server needed): 

https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5371/
Test PASSed.


---

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



[GitHub] spark issue #23148: [SPARK-26177] Automated formatting for Scala code

2018-11-26 Thread AmplabJenkins
Github user AmplabJenkins commented on the issue:

https://github.com/apache/spark/pull/23148
  
Merged build finished. Test PASSed.


---

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