sbt / sbt-github-actions

An sbt plugin which makes it easier to build with GitHub Actions
Apache License 2.0
194 stars 59 forks source link

Add scalafmt code formatter #144

Open mdedetrich opened 1 year ago

mdedetrich commented 1 year ago

I would like to propose adding scalafmt to this codebase for the same set of obvious reasons why having a code formatter is a good idea. The typical problem with adding a code formatter is it causes merge conflicts for currently open PR's however scalafmt is in a stage where there are only a couple of major PR's which are planned to be merged soon i.e.

The idea would be to introduce scalafmt after these PR's are merged. In regards to the actual scalafmt configuration, I am personally not that fussed. From introducing scalafmt to other projects usually there are 2 approaches to this, either try to find configuration that matches current style as much as possible (which can be a bit of work) or to just use something basic and deal with a large diff

@eed3si9n @armanbilge Thoughts?

armanbilge commented 1 year ago

just use something basic and deal with a large diff

that's fine. we can do the formatting in a separate commit and add it to .git-blame-ignore-revs.

mdedetrich commented 1 year ago

that's fine. we can do the formatting in a separate commit and add it to .git-blame-ignore-revs.

Perfect, specifically with .git-blame-ignore-revs I have already done this in Pekko and I can confirm it works without problems (almost every IDE/editor/tool that I can think of defers to git for git blame so it will respect .git-blame-ignore-revs).