scalafix
scalafix copied to clipboard
scalafix-testkit: expose --save-expect helper
trafficstars
When adding or maintaining integration tests via scalafix-testkit, it can be useful to dump the "actual" result of running the rules to the "expected" files, in the output directory.
This is what https://github.com/scalacenter/scalafix/blob/17a187ccc3e8d8a6acb7b57b4e8fb6e254e4ecd5/scalafix-tests/unit/src/test/scala/scalafix/tests/rule/RuleSuite.scala#L8-L29 does. This could be made more accessible and documented by exposing a dedicated task/command in sbt-scalafix ScalafixTestkitPlugin.
Triggered by https://github.com/scalacenter/sbt-scalafix/pull/120/files#r434473409.