diff --git a/.scalafix.conf b/.scalafix.conf index 1df6ecc1e79..92221ef1df2 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -1,3 +1,4 @@ rules = [ - RemoveUnused -] \ No newline at end of file + RemoveUnused, + NoAutoTupling +] diff --git a/bsp/worker/src/mill/bsp/worker/MillScalaBuildServer.scala b/bsp/worker/src/mill/bsp/worker/MillScalaBuildServer.scala index 7a6483f9d12..454ad9927b8 100644 --- a/bsp/worker/src/mill/bsp/worker/MillScalaBuildServer.scala +++ b/bsp/worker/src/mill/bsp/worker/MillScalaBuildServer.scala @@ -104,7 +104,7 @@ private trait MillScalaBuildServer extends ScalaBuildServer { this: MillBuildSer targetIds = _ => p.getTargets.asScala.toSeq, tasks = { case m: TestModule => - T.task(Some(m.runClasspath(), m.testFramework(), m.compile())) + T.task(Some((m.runClasspath(), m.testFramework(), m.compile()))) case _ => T.task(None) } diff --git a/build.sc b/build.sc index 397dbca33f7..3d8ab73de98 100644 --- a/build.sc +++ b/build.sc @@ -322,7 +322,7 @@ trait MillPublishJavaModule extends MillJavaModule with PublishModule { trait MillScalaModule extends ScalaModule with MillJavaModule with ScalafixModule{ outer => def scalaVersion = Deps.scalaVersion def scalacOptions = - super.scalacOptions() ++ Seq("-deprecation", "-P:acyclic:force", "-feature", "-Xlint:unused") + super.scalacOptions() ++ Seq("-deprecation", "-P:acyclic:force", "-feature", "-Xlint:unused", "-Xlint:adapted-args") def testIvyDeps: T[Agg[Dep]] = Agg(Deps.utest) def testModuleDeps: Seq[JavaModule] = diff --git a/main/eval/src/mill/eval/EvaluatorPaths.scala b/main/eval/src/mill/eval/EvaluatorPaths.scala index b1516a10453..c857afeabb3 100644 --- a/main/eval/src/mill/eval/EvaluatorPaths.scala +++ b/main/eval/src/mill/eval/EvaluatorPaths.scala @@ -14,7 +14,7 @@ object EvaluatorPaths { new EvaluatorPaths(dest, meta, log) private def unapply(evaluatorPaths: EvaluatorPaths): Option[(os.Path, os.Path, os.Path)] = - Option(evaluatorPaths.dest, evaluatorPaths.meta, evaluatorPaths.log) + Option((evaluatorPaths.dest, evaluatorPaths.meta, evaluatorPaths.log)) @internal private[mill] def makeSegmentStrings(segments: Segments): Seq[String] = segments.value.flatMap { diff --git a/main/src/mill/main/RunScript.scala b/main/src/mill/main/RunScript.scala index a331188ecbf..0f68581f3bf 100644 --- a/main/src/mill/main/RunScript.scala +++ b/main/src/mill/main/RunScript.scala @@ -60,7 +60,7 @@ object RunScript { case t: mill.define.NamedTask[_] => val jsonFile = EvaluatorPaths.resolveDestPaths(evaluator.outPath, t).meta val metadata = upickle.default.read[Evaluator.Cached](ujson.read(jsonFile.toIO)) - Some(t.toString, metadata.value) + Some((t.toString, metadata.value)) case _ => None } diff --git a/scalalib/src/mill/scalalib/JavaModule.scala b/scalalib/src/mill/scalalib/JavaModule.scala index d6184a6035f..8a5561ba9c7 100644 --- a/scalalib/src/mill/scalalib/JavaModule.scala +++ b/scalalib/src/mill/scalalib/JavaModule.scala @@ -881,7 +881,7 @@ trait JavaModule def runBackgroundLogToConsole: Boolean = true private def backgroundOutputs(dest: os.Path) = - if (runBackgroundLogToConsole) Some(os.Inherit, os.Inherit) + if (runBackgroundLogToConsole) Some((os.Inherit, os.Inherit)) else Jvm.defaultBackgroundOutputs(dest) /** diff --git a/scalalib/src/mill/scalalib/dependency/versions/Version.scala b/scalalib/src/mill/scalalib/dependency/versions/Version.scala index a669468f6c6..d91a46da03f 100644 --- a/scalalib/src/mill/scalalib/dependency/versions/Version.scala +++ b/scalalib/src/mill/scalalib/dependency/versions/Version.scala @@ -84,7 +84,7 @@ private[dependency] object ReleaseVersion { private[dependency] object PreReleaseVersion { def unapply(v: Version): Option[(List[Long], List[String])] = v match { case ValidVersion(_, releasePart, preReleasePart, Nil) if preReleasePart.nonEmpty => - Some(releasePart, preReleasePart) + Some((releasePart, preReleasePart)) case _ => None } } @@ -94,7 +94,7 @@ private[dependency] object PreReleaseBuildVersion { v match { case ValidVersion(_, releasePart, preReleasePart, buildPart) if preReleasePart.nonEmpty && buildPart.nonEmpty => - Some(releasePart, preReleasePart, buildPart) + Some((releasePart, preReleasePart, buildPart)) case _ => None } } @@ -104,7 +104,7 @@ private[dependency] object SnapshotVersion { v match { case ValidVersion(_, releasePart, preReleasePart, buildPart) if preReleasePart.lastOption.contains("SNAPSHOT") => - Some(releasePart, preReleasePart, buildPart) + Some((releasePart, preReleasePart, buildPart)) case _ => None } } @@ -112,7 +112,7 @@ private[dependency] object SnapshotVersion { private[dependency] object BuildVersion { def unapply(v: Version): Option[(List[Long], List[String])] = v match { case ValidVersion(_, releasePart, Nil, buildPart) if buildPart.nonEmpty => - Some(releasePart, buildPart) + Some((releasePart, buildPart)) case _ => None } } diff --git a/testrunner/src/mill/testrunner/TestRunnerUtils.scala b/testrunner/src/mill/testrunner/TestRunnerUtils.scala index 6b03013ed81..a025e37c014 100644 --- a/testrunner/src/mill/testrunner/TestRunnerUtils.scala +++ b/testrunner/src/mill/testrunner/TestRunnerUtils.scala @@ -21,11 +21,13 @@ import scala.jdk.CollectionConverters.IteratorHasAsScala } else { val zip = new ZipInputStream(new FileInputStream(base.toIO)) geny.Generator.selfClosing( - Iterator.continually(zip.getNextEntry) - .takeWhile(_ != null) - .map(_.getName) - .filter(_.endsWith(".class")), - () => zip.close() + ( + Iterator.continually(zip.getNextEntry) + .takeWhile(_ != null) + .map(_.getName) + .filter(_.endsWith(".class")), + () => zip.close() + ) ) } }