scalastyle failing even after ./dev/scalafmt

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

scalastyle failing even after ./dev/scalafmt

suddhu
Hello :)

I'm running this example form the official site:
https://spark.apache.org/developer-tools.html

testOnly *DAGSchedulerSuite -- -z "SPARK-12345"

But I get:
[error] (catalyst/*:scalaStyleOnTest) Failing because of negative scalastyle
result

This happens even *after* running ./dev/scalafmt

Any reasons why? Sometimes I also get an error message that a line in the
code is >100 char long. But isnt this the kind of thing that scalafmt should
fix? Also, my scalastyle-on-compile.generated.xml, scalastyle-output.xml,
scalastyle.txt all seem to be empty.




--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: scalastyle failing even after ./dev/scalafmt

Sean Owen-2
We don't really use scalafmt, but there's a config and profile for it.
I am not sure if it will necessarily do the right thing in all cases.
You haven't shown the scalastyle failure, but if you've changed the
code, that's probably it. It is passing locally and on master.

On Sat, May 16, 2020 at 12:58 PM suddhu <[hidden email]> wrote:

>
> Hello :)
>
> I'm running this example form the official site:
> https://spark.apache.org/developer-tools.html
>
> testOnly *DAGSchedulerSuite -- -z "SPARK-12345"
>
> But I get:
> [error] (catalyst/*:scalaStyleOnTest) Failing because of negative scalastyle
> result
>
> This happens even *after* running ./dev/scalafmt
>
> Any reasons why? Sometimes I also get an error message that a line in the
> code is >100 char long. But isnt this the kind of thing that scalafmt should
> fix? Also, my scalastyle-on-compile.generated.xml, scalastyle-output.xml,
> scalastyle.txt all seem to be empty.
>
>
>
>
> --
> Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/
>
> ---------------------------------------------------------------------
> To unsubscribe e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: scalastyle failing even after ./dev/scalafmt

suddhu
How do you format your code before sending the PR then?
Do I not need to run scalafmt?



--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: scalastyle failing even after ./dev/scalafmt

Sean Owen-2
You just follow the standard style guide - pretty much copy what you see - and run scalastyle locally to fix any few issues that pop up.

On Sat, May 16, 2020, 6:58 PM suddhu <[hidden email]> wrote:
How do you format your code before sending the PR then?
Do I not need to run scalafmt?



--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: scalastyle failing even after ./dev/scalafmt

Manu Zhang
I recently found it's slick to add `dev/lint-scala` to git pre-commit hooks.



On Sun, May 17, 2020 at 9:22 AM Sean Owen <[hidden email]> wrote:
You just follow the standard style guide - pretty much copy what you see - and run scalastyle locally to fix any few issues that pop up.

On Sat, May 16, 2020, 6:58 PM suddhu <[hidden email]> wrote:
How do you format your code before sending the PR then?
Do I not need to run scalafmt?



--
Sent from: http://apache-spark-developers-list.1001551.n3.nabble.com/

---------------------------------------------------------------------
To unsubscribe e-mail: [hidden email]