laughedelic / scalafmt-probot

🤖Github bot for checking code formatting with scalafmt
https://github.com/apps/scalafmt-probot
Mozilla Public License 2.0
16 stars 4 forks source link

Check only changed files #2

Open laughedelic opened 6 years ago

laughedelic commented 6 years ago

Current simple implementation just lists all files in the repo (at a given commit) and checks their formatting. This may take a long time in big repos. So the plan is to check only the files changed in the PR (i.e. assuming that master stays well-formatted).

laughedelic commented 6 years ago

I tried to run it on the sbt/sbt repo and the current naive implementation (getting files content one by one) takes forever.

Here's an idea of how this should work:

A simplified version to start with:

Other thoughts: