Repository: scala-steward-org/scala-steward
Pull request #1655 (2020-10-11 21:25:10)

Group process and sandbox related configuration
This puts process and sandbox related configuration in new `ProcessCfg`
and `SandboxCfg` classes. The benefit here is that we only pass needed
configuratin to `ProcessAlg`.

codecov[bot]: # [Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=h1) Report
> Merging [#1655](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=desc) into [master](https://codecov.io/gh/scala-steward-org/scala-steward/commit/fd3628b3b5253460b8e98103886dc430df098811?el=desc) will **decrease** coverage by `0.15%`.
> The diff coverage is `9.09%`.

[![Impacted file tree graph](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655/graphs/tree.svg?width=650&height=150&src=pr&token=udzMsc1Dne)](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #1655      +/-   ##
==========================================
- Coverage   71.76%   71.61%   -0.16%     
==========================================
  Files         114      114              
  Lines        1877     1881       +4     
  Branches       56       56              
==========================================
  Hits         1347     1347              
- Misses        530      534       +4     
```


| [Impacted Files](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ala/org/scalasteward/core/application/Config.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655/diff?src=pr&el=tree#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS9hcHBsaWNhdGlvbi9Db25maWcuc2NhbGE=) | `0.00% <0.00%> (ø)` | |
| [...la/org/scalasteward/core/application/Context.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655/diff?src=pr&el=tree#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS9hcHBsaWNhdGlvbi9Db250ZXh0LnNjYWxh) | `0.00% <ø> (ø)` | |
| [.../scalasteward/core/scalafix/MigrationsLoader.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655/diff?src=pr&el=tree#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS9zY2FsYWZpeC9NaWdyYXRpb25zTG9hZGVyLnNjYWxh) | `100.00% <ø> (ø)` | |
| [...in/scala/org/scalasteward/core/io/ProcessAlg.scala](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655/diff?src=pr&el=tree#diff-bW9kdWxlcy9jb3JlL3NyYy9tYWluL3NjYWxhL29yZy9zY2FsYXN0ZXdhcmQvY29yZS9pby9Qcm9jZXNzQWxnLnNjYWxh) | `100.00% <100.00%> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=footer). Last update [fd3628b...039dd68](https://codecov.io/gh/scala-steward-org/scala-steward/pull/1655?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala b/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
index 1fb3237c..eff6c078 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/application/Config.scala
@@ -16,12 +16,12 @@
 
 package org.scalasteward.core.application
 
-import better.files._
+import better.files.File
 import cats.effect.Sync
 import org.http4s.Uri
 import org.http4s.Uri.UserInfo
 import org.scalasteward.core.application.Cli.EnvVar
-import org.scalasteward.core.application.Config.Scalafix
+import org.scalasteward.core.application.Config.{ProcessCfg, ScalafixCfg}
 import org.scalasteward.core.git.Author
 import org.scalasteward.core.util
 import org.scalasteward.core.vcs.data.AuthenticatedUser
@@ -62,14 +62,10 @@ final case class Config(
     vcsLogin: String,
     gitAskPass: File,
     signCommits: Boolean,
-    whitelistedDirectories: List[String],
-    readOnlyDirectories: List[String],
-    disableSandbox: Boolean,
     doNotFork: Boolean,
     ignoreOptsFiles: Boolean,
-    envVars: List[EnvVar],
-    processTimeout: FiniteDuration,
-    scalafix: Scalafix,
+    processCfg: ProcessCfg,
+    scalafixCfg: ScalafixCfg,
     groupMigrations: Option[File],
     cacheTtl: FiniteDuration,
     cacheMissDelay: FiniteDuration,
@@ -87,7 +83,19 @@ final case class Config(
 }
 
 object Config {
-  final case class Scalafix(
+  final case class ProcessCfg(
+      envVars: List[EnvVar],
+      processTimeout: FiniteDuration,
+      sandboxCfg: SandboxCfg
+  )
+
+  final case class SandboxCfg(
+      whitelistedDirectories: List[String],
+      readOnlyDirectories: List[String],
+      disableSandbox: Boolean
+  )
+
+  final case class ScalafixCfg(
       migrations: List[Uri],
       disableDefaults: Boolean
   )
@@ -103,14 +111,21 @@ object Config {
       vcsLogin = args.vcsLogin,
       gitAskPass = args.gitAskPass,
       signCommits = args.signCommits,
-      whitelistedDirectories = args.whitelist,
-      readOnlyDirectories = args.readOnly,
-      disableSandbox = args.disableSandbox,
       doNotFork = args.doNotFork,
       ignoreOptsFiles = args.ignoreOptsFiles,
-      envVars = args.envVar,
-      processTimeout = args.processTimeout,
-      scalafix = Scalafix(args.scalafixMigrations, args.disableDefaultScalafixMigrations),
+      processCfg = ProcessCfg(
+        envVars = args.envVar,
+        processTimeout = args.processTimeout,
+        sandboxCfg = SandboxCfg(
+          whitelistedDirectories = args.whitelist,
+          readOnlyDirectories = args.readOnly,
+          disableSandbox = args.disableSandbox
+        )
+      ),
+      scalafixCfg = ScalafixCfg(
+        migrations = args.scalafixMigrations,
+        disableDefaults = args.disableDefaultScalafixMigrations
+      ),
       groupMigrations = args.groupMigrations,
       cacheTtl = args.cacheTtl,
       cacheMissDelay = args.cacheMissDelay,
diff --git a/modules/core/src/main/scala/org/scalasteward/core/application/Context.scala b/modules/core/src/main/scala/org/scalasteward/core/application/Context.scala
index 541887fc..eccd0c75 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/application/Context.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/application/Context.scala
@@ -57,12 +57,12 @@ object Context {
       implicit0(user: AuthenticatedUser) <- Resource.liftF(config.vcsUser[F])
       implicit0(fileAlg: FileAlg[F]) = FileAlg.create[F]
       implicit0(migrationAlg: MigrationAlg) <-
-        Resource.liftF(new MigrationsLoader[F].loadAll(config.scalafix).map(new MigrationAlg(_)))
+        Resource.liftF(new MigrationsLoader[F].loadAll(config.scalafixCfg).map(new MigrationAlg(_)))
       implicit0(groupMigration: GroupMigrations) <- Resource.liftF(GroupMigrations.create[F])
     } yield {
       val kvsPrefix = Some(config.vcsType.asString)
       implicit val dateTimeAlg: DateTimeAlg[F] = DateTimeAlg.create[F]
-      implicit val processAlg: ProcessAlg[F] = ProcessAlg.create[F](blocker)
+      implicit val processAlg: ProcessAlg[F] = ProcessAlg.create[F](blocker, config.processCfg)
       implicit val workspaceAlg: WorkspaceAlg[F] = WorkspaceAlg.create[F]
       implicit val repoConfigAlg: RepoConfigAlg[F] = new RepoConfigAlg[F]
       implicit val filterAlg: FilterAlg[F] = new FilterAlg[F]
diff --git a/modules/core/src/main/scala/org/scalasteward/core/io/ProcessAlg.scala b/modules/core/src/main/scala/org/scalasteward/core/io/ProcessAlg.scala
index c11647d8..ba02481a 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/io/ProcessAlg.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/io/ProcessAlg.scala
@@ -20,7 +20,7 @@ import better.files.File
 import cats.effect.{Blocker, Concurrent, ContextShift, Timer}
 import cats.syntax.all._
 import io.chrisdavenport.log4cats.Logger
-import org.scalasteward.core.application.Config
+import org.scalasteward.core.application.Config.{ProcessCfg, SandboxCfg}
 import org.scalasteward.core.util.Nel
 
 trait ProcessAlg[F[_]] {
@@ -30,7 +30,7 @@ trait ProcessAlg[F[_]] {
 }
 
 object ProcessAlg {
-  abstract class UsingFirejail[F[_]](config: Config) extends ProcessAlg[F] {
+  abstract class UsingFirejail[F[_]](config: SandboxCfg) extends ProcessAlg[F] {
     override def execSandboxed(command: Nel[String], cwd: File): F[List[String]] =
       if (config.disableSandbox)
         exec(command, cwd)
@@ -43,15 +43,14 @@ object ProcessAlg {
       }
   }
 
-  def create[F[_]](blocker: Blocker)(implicit
-      config: Config,
+  def create[F[_]](blocker: Blocker, config: ProcessCfg)(implicit
       contextShift: ContextShift[F],
       logger: Logger[F],
       timer: Timer[F],
       F: Concurrent[F]
   ): ProcessAlg[F] = {
     val envVars = config.envVars.map(v => (v.name, v.value))
-    new UsingFirejail[F](config) {
+    new UsingFirejail[F](config.sandboxCfg) {
       override def exec(
           command: Nel[String],
           cwd: File,
diff --git a/modules/core/src/main/scala/org/scalasteward/core/scalafix/MigrationsLoader.scala b/modules/core/src/main/scala/org/scalasteward/core/scalafix/MigrationsLoader.scala
index 90452669..4ca50b0a 100644
--- a/modules/core/src/main/scala/org/scalasteward/core/scalafix/MigrationsLoader.scala
+++ b/modules/core/src/main/scala/org/scalasteward/core/scalafix/MigrationsLoader.scala
@@ -21,7 +21,7 @@ import io.chrisdavenport.log4cats.Logger
 import io.circe.config.parser.decode
 import org.http4s.Uri
 import org.http4s.implicits.http4sLiteralsSyntax
-import org.scalasteward.core.application.Config
+import org.scalasteward.core.application.Config.ScalafixCfg
 import org.scalasteward.core.io.FileAlg
 import org.scalasteward.core.scalafix.MigrationsLoader._
 import org.scalasteward.core.util.MonadThrowable
@@ -31,7 +31,7 @@ final class MigrationsLoader[F[_]](implicit
     logger: Logger[F],
     F: MonadThrowable[F]
 ) {
-  def loadAll(config: Config.Scalafix): F[List[Migration]] = {
+  def loadAll(config: ScalafixCfg): F[List[Migration]] = {
     val maybeDefaultMigrationsUrl =
       Option.unless(config.disableDefaults)(defaultScalafixMigrationsUrl)
     (maybeDefaultMigrationsUrl.toList ++ config.migrations)
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 42130ab6..422405d8 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -4,7 +4,7 @@ addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3")
 addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
 addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.13")
 addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.7")
-addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.5")
+addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6")
 addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
 addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.14")
 addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/io/MockProcessAlg.scala b/modules/core/src/test/scala/org/scalasteward/core/io/MockProcessAlg.scala
index 9375a1ca..20c44ae6 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/io/MockProcessAlg.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/io/MockProcessAlg.scala
@@ -1,11 +1,12 @@
 package org.scalasteward.core.io
 
 import better.files.File
-import org.scalasteward.core.application.Config
+import org.scalasteward.core.application.Config.ProcessCfg
+import org.scalasteward.core.io.ProcessAlg.UsingFirejail
 import org.scalasteward.core.mock.{applyPure, MockEff}
 import org.scalasteward.core.util.Nel
 
-class MockProcessAlg(config: Config) extends ProcessAlg.UsingFirejail[MockEff](config) {
+class MockProcessAlg(config: ProcessCfg) extends UsingFirejail[MockEff](config.sandboxCfg) {
   private val envVars = config.envVars.map(v => (v.name, v.value))
 
   override def exec(
diff --git a/modules/core/src/test/scala/org/scalasteward/core/io/ProcessAlgTest.scala b/modules/core/src/test/scala/org/scalasteward/core/io/ProcessAlgTest.scala
index 4c51678b..34a16939 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/io/ProcessAlgTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/io/ProcessAlgTest.scala
@@ -4,21 +4,23 @@ import better.files.File
 import cats.effect.{Blocker, IO}
 import java.util.concurrent.Executors
 import org.scalasteward.core.TestInstances._
+import org.scalasteward.core.application.Config.{ProcessCfg, SandboxCfg}
 import org.scalasteward.core.io.ProcessAlgTest.ioProcessAlg
-import org.scalasteward.core.mock.MockContext._
+import org.scalasteward.core.mock.MockContext.config
 import org.scalasteward.core.mock.MockState
 import org.scalasteward.core.util.Nel
 import org.scalatest.funsuite.AnyFunSuite
 import org.scalatest.matchers.should.Matchers
+import scala.concurrent.duration.Duration
 
 class ProcessAlgTest extends AnyFunSuite with Matchers {
-  test("exec echo") {
+  test("exec: echo") {
     ioProcessAlg
       .exec(Nel.of("echo", "-n", "hello"), File.currentWorkingDirectory)
       .unsafeRunSync() shouldBe List("hello")
   }
 
-  test("exec false") {
+  test("exec: ls --foo") {
     ioProcessAlg
       .exec(Nel.of("ls", "--foo"), File.currentWorkingDirectory)
       .attempt
@@ -26,37 +28,30 @@ class ProcessAlgTest extends AnyFunSuite with Matchers {
       .unsafeRunSync()
   }
 
-  test("respect the disableSandbox setting") {
-    val cfg = config.copy(disableSandbox = true)
-    val processAlg = new MockProcessAlg(cfg)
-
-    val state = processAlg
+  test("execSandboxed: echo with disableSandbox = true") {
+    val cfg = ProcessCfg(Nil, Duration.Zero, SandboxCfg(Nil, Nil, disableSandbox = true))
+    val state = new MockProcessAlg(cfg)
       .execSandboxed(Nel.of("echo", "hello"), File.temp)
       .runS(MockState.empty)
       .unsafeRunSync()
 
     state shouldBe MockState.empty.copy(
-      commands = Vector(List("VAR1=val1", "VAR2=val2", File.temp.toString, "echo", "hello"))
+      commands = Vector(
+        List(File.temp.toString, "echo", "hello")
+      )
     )
   }
 
-  test("execSandboxed echo") {
-    val state = processAlg
+  test("execSandboxed: echo with disableSandbox = false") {
+    val cfg = ProcessCfg(Nil, Duration.Zero, SandboxCfg(Nil, Nil, disableSandbox = false))
+    val state = new MockProcessAlg(cfg)
       .execSandboxed(Nel.of("echo", "hello"), File.temp)
       .runS(MockState.empty)
       .unsafeRunSync()
 
     state shouldBe MockState.empty.copy(
       commands = Vector(
-        List(
-          "VAR1=val1",
-          "VAR2=val2",
-          File.temp.toString,
-          "firejail",
-          s"--whitelist=${File.temp}",
-          "echo",
-          "hello"
-        )
+        List(File.temp.toString, "firejail", s"--whitelist=${File.temp}", "echo", "hello")
       )
     )
   }
@@ -64,5 +59,5 @@ class ProcessAlgTest extends AnyFunSuite with Matchers {
 
 object ProcessAlgTest {
   val blocker: Blocker = Blocker.liftExecutorService(Executors.newCachedThreadPool())
-  implicit val ioProcessAlg: ProcessAlg[IO] = ProcessAlg.create[IO](blocker)
+  implicit val ioProcessAlg: ProcessAlg[IO] = ProcessAlg.create[IO](blocker, config.processCfg)
 }
diff --git a/modules/core/src/test/scala/org/scalasteward/core/mock/MockContext.scala b/modules/core/src/test/scala/org/scalasteward/core/mock/MockContext.scala
index d013ded9..b727260d 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/mock/MockContext.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/mock/MockContext.scala
@@ -6,14 +6,14 @@ import cats.effect.Sync
 import org.http4s.Uri
 import org.scalasteward.core.TestInstances.ioContextShift
 import org.scalasteward.core.application.Cli.EnvVar
-import org.scalasteward.core.application.{Config, SupportedVCS}
+import org.scalasteward.core.application.{Cli, Config, SupportedVCS}
 import org.scalasteward.core.buildtool.BuildToolDispatcher
 import org.scalasteward.core.buildtool.maven.MavenAlg
 import org.scalasteward.core.buildtool.mill.MillAlg
 import org.scalasteward.core.buildtool.sbt.SbtAlg
 import org.scalasteward.core.coursier.{CoursierAlg, VersionsCache}
 import org.scalasteward.core.edit.EditAlg
-import org.scalasteward.core.git.{Author, GitAlg}
+import org.scalasteward.core.git.GitAlg
 import org.scalasteward.core.io.{MockFileAlg, MockProcessAlg, MockWorkspaceAlg}
 import org.scalasteward.core.nurture.PullRequestRepository
 import org.scalasteward.core.persistence.JsonKeyValueStore
@@ -29,40 +29,38 @@ import org.scalasteward.core.vcs.data.AuthenticatedUser
 import scala.concurrent.duration._
 
 object MockContext {
-  implicit val config: Config = Config(
-    workspace = File.temp / "ws",
-    reposFile = File.temp / "repos.md",
-    defaultRepoConfigFile = Some(File.temp / "default.scala-steward.conf"),
-    gitAuthor = Author("Bot Doe", "bot@example.org"),
-    vcsType = SupportedVCS.GitHub,
-    vcsApiHost = Uri(),
-    vcsLogin = "bot-doe",
-    gitAskPass = File.temp / "askpass.sh",
-    signCommits = false,
-    whitelistedDirectories = Nil,
-    readOnlyDirectories = Nil,
-    disableSandbox = false,
-    doNotFork = false,
-    ignoreOptsFiles = false,
-    envVars = List(
-      EnvVar("VAR1", "val1"),
-      EnvVar("VAR2", "val2")
-    ),
-    processTimeout = 10.minutes,
-    scalafix = Config.Scalafix(Nil, disableDefaults = false),
-    groupMigrations = None,
-    cacheTtl = 1.hour,
-    cacheMissDelay = 0.milliseconds,
-    bitbucketServerUseDefaultReviewers = false,
-    gitlabMergeWhenPipelineSucceeds = false
-  )
+  implicit val config: Config =
+    Config.from(
+      Cli.Args(
+        workspace = File.temp / "ws",
+        reposFile = File.temp / "repos.md",
+        defaultRepoConf = Some(File.temp / "default.scala-steward.conf"),
+        gitAuthorName = "Bot Doe",
+        gitAuthorEmail = "bot@example.org",
+        vcsType = SupportedVCS.GitHub,
+        vcsApiHost = Uri(),
+        vcsLogin = "bot-doe",
+        gitAskPass = File.temp / "askpass.sh",
+        envVar = List(
+          EnvVar("VAR1", "val1"),
+          EnvVar("VAR2", "val2")
+        ),
+        processTimeout = 10.minutes,
+        whitelist = Nil,
+        readOnly = Nil,
+        scalafixMigrations = Nil,
+        groupMigrations = None,
+        cacheTtl = 1.hour,
+        cacheMissDelay = 0.milliseconds
+      )
+    )
 
   implicit val mockEffBracketThrowable: BracketThrowable[MockEff] = Sync[MockEff]
   implicit val mockEffParallel: Parallel[MockEff] = Parallel.identity
 
   implicit val fileAlg: MockFileAlg = new MockFileAlg
   implicit val mockLogger: MockLogger = new MockLogger
-  implicit val processAlg: MockProcessAlg = new MockProcessAlg(config)
+  implicit val processAlg: MockProcessAlg = new MockProcessAlg(config.processCfg)
   implicit val workspaceAlg: MockWorkspaceAlg = new MockWorkspaceAlg
 
   implicit val coursierAlg: CoursierAlg[MockEff] = CoursierAlg.create
@@ -73,7 +71,7 @@ object MockContext {
   implicit val scalafmtAlg: ScalafmtAlg[MockEff] = ScalafmtAlg.create
   val migrationsLoader: MigrationsLoader[MockEff] = new MigrationsLoader[MockEff]
   implicit val migrationAlg: MigrationAlg = migrationsLoader
-    .loadAll(config.scalafix)
+    .loadAll(config.scalafixCfg)
     .map(new MigrationAlg(_))
     .runA(MigrationsLoaderTest.mockState)
     .unsafeRunSync()
diff --git a/modules/core/src/test/scala/org/scalasteward/core/scalafix/MigrationsLoaderTest.scala b/modules/core/src/test/scala/org/scalasteward/core/scalafix/MigrationsLoaderTest.scala
index d4a3a042..52200fc6 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/scalafix/MigrationsLoaderTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/scalafix/MigrationsLoaderTest.scala
@@ -1,7 +1,7 @@
 package org.scalasteward.core.scalafix
 
 import org.http4s.Uri
-import org.scalasteward.core.application.Config
+import org.scalasteward.core.application.Config.ScalafixCfg
 import org.scalasteward.core.data.{GroupId, Version}
 import org.scalasteward.core.io.FileAlgTest.ioFileAlg
 import org.scalasteward.core.mock.MockContext._
@@ -34,7 +34,7 @@ class MigrationsLoaderTest extends AnyFunSuite with Matchers {
 
   test("loadAll: without extra file, without defaults") {
     val migrations = migrationsLoader
-      .loadAll(Config.Scalafix(Nil, disableDefaults = true))
+      .loadAll(ScalafixCfg(Nil, disableDefaults = true))
       .runA(mockState)
       .unsafeRunSync()
     migrations.size shouldBe 0
@@ -42,7 +42,7 @@ class MigrationsLoaderTest extends AnyFunSuite with Matchers {
 
   test("loadAll: without extra file, with defaults") {
     val migrations = migrationsLoader
-      .loadAll(Config.Scalafix(Nil, disableDefaults = false))
+      .loadAll(ScalafixCfg(Nil, disableDefaults = false))
       .runA(mockState)
       .unsafeRunSync()
     migrations.size should be > 0
@@ -51,7 +51,7 @@ class MigrationsLoaderTest extends AnyFunSuite with Matchers {
   test("loadAll: with extra file, without defaults") {
     val initialState = mockState.addUri(migrationsUri, migrationsContent)
     val migrations = migrationsLoader
-      .loadAll(Config.Scalafix(List(migrationsUri), disableDefaults = true))
+      .loadAll(ScalafixCfg(List(migrationsUri), disableDefaults = true))
       .runA(initialState)
       .unsafeRunSync()
     migrations shouldBe List(migration)
@@ -60,7 +60,7 @@ class MigrationsLoaderTest extends AnyFunSuite with Matchers {
   test("loadAll: with extra file, with defaults") {
     val initialState = mockState.addUri(migrationsUri, migrationsContent)
     val migrations = migrationsLoader
-      .loadAll(Config.Scalafix(List(migrationsUri), disableDefaults = false))
+      .loadAll(ScalafixCfg(List(migrationsUri), disableDefaults = false))
       .runA(initialState)
       .unsafeRunSync()
     migrations.size should be > 1
@@ -70,7 +70,7 @@ class MigrationsLoaderTest extends AnyFunSuite with Matchers {
   test("loadAll: malformed extra file") {
     val initialState = mockState.addUri(migrationsUri, """{"key": "i'm not a valid Migration}""")
     val migrations = migrationsLoader
-      .loadAll(Config.Scalafix(List(migrationsUri), disableDefaults = false))
+      .loadAll(ScalafixCfg(List(migrationsUri), disableDefaults = false))
       .runA(initialState)
       .attempt
       .unsafeRunSync()