algebra icon indicating copy to clipboard operation
algebra copied to clipboard

Automatic style-checking and/or scalariform rewriting

Open non opened this issue 10 years ago • 1 comments

I have a branch which adds style-checking and Scalariform.

How do people feel about this? If we are going to do this, it will require one big PR to get all the warnings dealt with and the code reformatted.

I think Scalastyle shouldn't be too contentious. I've started using it on other projects and it should be easy to find a rule set that we can all live with.

As far as Scalariform, I seem to recall @johnynek and @avibryant both saying positive things about it. Running a test, the only change which I don't love is that:

tpls.map { case (x, y) =>
  ...
}

is rewritten to:

tpls.map {
  case (x, y) =>
    ...
}

But I can live with this if everyone else wants to move in this direction.

non avatar Jun 07 '15 03:06 non

yeah, I'm not crazy about that, but automatic uniformity is nice.

Haven't checked lately to see if we can disable that one (and add my pet one: no superfluous { }).

johnynek avatar Jun 08 '15 19:06 johnynek