CI: instead of failing builds with bad formatting, push a commit back which fixes it
Closed this issue · 1 comments
oyvindberg commented
The context switch involved with switching branch, restart sbt, wait for it to load, wait for it to load all the dependent builds, type scalafmt, wait, type scalafixAll, wait, wait, wait is enormous.
this bit of developer convenience would really help a lot
tgodzik commented
Thanks for reporting! One thing that we could do for this is to automatically add a hook that would run scalafmt on push. This makes it less likely that anyone will push a commit with a wrong formatting.
For example we do it here: https://github.com/scalameta/metals/blob/main/build.sbt#L72