Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Jan 22, 2025
1 parent ce4a916 commit 93fe823
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions main/init/buildgen/src/mill/main/buildgen/BuildGenUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import mill.main.client.CodeGenConstants.{
import mill.main.client.OutFiles
import mill.runner.FileImportGraph.backtickWrap

import scala.collection.mutable
import scala.collection.immutable.SortedSet

@mill.api.internal
object BuildGenUtil {
Expand Down Expand Up @@ -116,7 +116,11 @@ object BuildGenUtil {
os.sub / dirs / name
}

def renderImports(baseModule: Option[String], isNested: Boolean, packagesSize: Int) = {
def renderImports(
baseModule: Option[String],
isNested: Boolean,
packagesSize: Int
): SortedSet[String] = {
scala.collection.immutable.SortedSet("mill._", "mill.javalib._", "mill.javalib.publish._") ++
(if (isNested) baseModule.map(name => s"$$file.$name")
else if (packagesSize > 1) Seq("$packages._")
Expand Down Expand Up @@ -443,7 +447,7 @@ object BuildGenUtil {
}
}

def renderTestModuleDecl(testModule: String, testModuleType: Option[String]) = {
def renderTestModuleDecl(testModule: String, testModuleType: Option[String]): String = {
val name = backtickWrap(testModule)
testModuleType match {
case Some(supertype) => s"object $name extends MavenTests with $supertype"
Expand Down
1 change: 0 additions & 1 deletion main/init/buildgen/src/mill/main/buildgen/ir.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package mill.main.buildgen

import scala.collection.immutable.{SortedMap, SortedSet}
import scala.collection.mutable

/**
* A Mill build module defined as a Scala object.
Expand Down
2 changes: 1 addition & 1 deletion main/init/gradle/src/mill/main/gradle/BuildGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ object BuildGen {
project: ProjectModel,
packages: PartialFunction[(String, String, String), String],
cfg: BuildGenConfig
) = {
): IrScopedDeps = {
var sd = IrScopedDeps()
val hasTest = os.exists(os.Path(project.directory()) / "src/test")
val _java = project._java()
Expand Down

0 comments on commit 93fe823

Please sign in to comment.