spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reynold Xin <r...@databricks.com>
Subject Re: spark code formatter?
Date Thu, 09 Jan 2014 07:51:39 GMT
Thanks for doing that, DB. Not sure about others, but I'm actually strongly
against blanket automatic code formatters, given that they can be
disruptive. Often humans would intentionally choose to style things in a
certain way for more clear semantics and better readability. Code
formatters don't capture these nuances. It is pretty dangerous to just auto
format everything.

Maybe it'd be ok if we restrict the code formatters to a very limited set
of things, such as indenting function parameters, etc.


On Wed, Jan 8, 2014 at 10:28 PM, DB Tsai <dbtsai@alpinenow.com> wrote:

> A pull request for scalariform.
> https://github.com/apache/incubator-spark/pull/365
>
> Sincerely,
>
> DB Tsai
> Machine Learning Engineer
> Alpine Data Labs
> --------------------------------------
> Web: http://alpinenow.com/
>
>
> On Wed, Jan 8, 2014 at 10:09 PM, DB Tsai <dbtsai@alpinenow.com> wrote:
> > We use sbt-scalariform in our company, and it can automatically format
> > the coding style when runs `sbt compile`.
> >
> > https://github.com/sbt/sbt-scalariform
> >
> > We ask our developers to run `sbt compile` before commit, and it's
> > really nice to see everyone has the same spacing and indentation.
> >
> > Sincerely,
> >
> > DB Tsai
> > Machine Learning Engineer
> > Alpine Data Labs
> > --------------------------------------
> > Web: http://alpinenow.com/
> >
> >
> > On Wed, Jan 8, 2014 at 9:50 PM, Reynold Xin <rxin@databricks.com> wrote:
> >> We have a Scala style configuration file in Shark:
> >> https://github.com/amplab/shark/blob/master/scalastyle-config.xml
> >>
> >> However, the scalastyle project is still pretty primitive and doesn't
> cover
> >> most of the use cases. It is still great to include it to cover basic
> >> checks such as 100-char wide lines.
> >>
> >>
> >> On Wed, Jan 8, 2014 at 8:02 PM, Matei Zaharia <matei.zaharia@gmail.com
> >wrote:
> >>
> >>> Not that I know of. This would be very useful to add, especially if we
> can
> >>> make SBT automatically check the code style (or we can somehow plug
> this
> >>> into Jenkins).
> >>>
> >>> Matei
> >>>
> >>> On Jan 8, 2014, at 11:00 AM, Michael Allman <msa@allman.ms> wrote:
> >>>
> >>> > Hi,
> >>> >
> >>> > I've read the spark code style guide for contributors here:
> >>> >
> >>> >
> https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide
> >>> >
> >>> > For scala code, do you have a scalariform configuration that you use
> to
> >>> format your code to these specs?
> >>> >
> >>> > Cheers,
> >>> >
> >>> > Michael
> >>>
> >>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message