You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Format it with scalafmt built from master (or last release)
Format it with scalafmt built from your branch
push scala-repos changes
Add link to commit difference to your PR
It would be good to have GitHub bot (or something like it) that can react on "regress, please" comment on pull request and run job with regression testing. And the add comment with difference link to PR.
@poslegm excellent idea, would make life easier. i have a couple of points:
suggestion: compare with the common ancestor of the proposed branch and the master, otherwise you will include formatting changes that weren't caused by the pull request and likely had been reviewed and approved previously
challenge: what .scalafmt configuration to use for a given pull request? does it modify rewrite rules, or vertical multiline, or some other non-default or simply uncommon fork in the execution path? perhaps we can have a dozen of precanned configurations and use each.
another challenge: can we also try to build the reformatted code? some of the recent bugs filed after 2.4.0 were about a rewrite breaking the code, but a newline in the wrong spot could do that, too.
suggestion: compare with the common ancestor of the proposed branch and the master, otherwise you will include formatting changes that weren't caused by the pull request and likely had been reviewed and approved previously
Yes, you are right. It will be more correct way.
challenge: what .scalafmt configuration to use for a given pull request?
It will not be hard to specify .scalafmt.conf content in bot run command:
regress, please
maxColumn = 120
another challenge: can we also try to build the reformatted code?
In ideal world yes. But then we'll have to support scala-repos in buildable state. It's complicated task. And regress job duration will increase a lot with all projects build.
There is a very helpful ability to perform regression testing of formatting changes:
It would be good to have GitHub bot (or something like it) that can react on "regress, please" comment on pull request and run job with regression testing. And the add comment with difference link to PR.
Script draft:
Related: #154
The text was updated successfully, but these errors were encountered: