Skip to content

Commit 95b5744

Browse files
[autofix.ci] apply automated fixes
1 parent 7a5de49 commit 95b5744

File tree

7 files changed

+28
-13
lines changed

7 files changed

+28
-13
lines changed

core/exec/src/mill/exec/GroupExecution.scala

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,10 @@ object GroupExecution {
831831

832832
private def normalizeForCheck(path: os.Path): os.Path = {
833833
@tailrec
834-
def firstExistingPrefix(current: os.Path, suffix: List[String]): Option[(os.Path, List[String])] =
834+
def firstExistingPrefix(
835+
current: os.Path,
836+
suffix: List[String]
837+
): Option[(os.Path, List[String])] =
835838
if (os.exists(current)) Some((current, suffix))
836839
else {
837840
val parent = current / os.up
@@ -852,7 +855,8 @@ object GroupExecution {
852855

853856
private def relativeForError(original: os.Path, normalized: os.Path): String = {
854857
if (original.startsWith(workspace)) original.relativeTo(workspace).toString
855-
else if (normalized.startsWith(normalizedWorkspace)) normalized.relativeTo(normalizedWorkspace).toString
858+
else if (normalized.startsWith(normalizedWorkspace))
859+
normalized.relativeTo(normalizedWorkspace).toString
856860
else original.toString
857861
}
858862

@@ -863,7 +867,10 @@ object GroupExecution {
863867
val inWorkspace =
864868
path.startsWith(workspace) || normalizedPath.startsWith(normalizedWorkspace)
865869
val allowed =
866-
startsWithAny(path, validReadDests) || startsWithAny(normalizedPath, normalizedReadDests)
870+
startsWithAny(
871+
path,
872+
validReadDests
873+
) || startsWithAny(normalizedPath, normalizedReadDests)
867874
if (inWorkspace && !allowed) {
868875
sys.error(
869876
s"Reading from ${relativeForError(path, normalizedPath)} not allowed during execution of `$terminal`.\n" +
@@ -880,7 +887,10 @@ object GroupExecution {
880887
val inWorkspace =
881888
path.startsWith(workspace) || normalizedPath.startsWith(normalizedWorkspace)
882889
val allowed =
883-
startsWithAny(path, validWriteDests) || startsWithAny(normalizedPath, normalizedWriteDests)
890+
startsWithAny(path, validWriteDests) || startsWithAny(
891+
normalizedPath,
892+
normalizedWriteDests
893+
)
884894
if (inWorkspace && !allowed) {
885895
sys.error(
886896
s"Writing to ${relativeForError(path, normalizedPath)} not allowed during execution of `$terminal`.\n" +

libs/javalib/src/mill/javalib/JlinkModule.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import mill.util.Jvm
1010
* The official `jlink` docs: https://docs.oracle.com/en/java/javase/23/docs/specs/man/jlink.html
1111
*/
1212
trait JlinkModule extends JavaModule {
13+
1314
/** The base name for the runtime image */
1415
def jlinkImageName: T[String] = Task { "jlink" }
1516

libs/javalib/src/mill/javalib/JpackageModule.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import mill.util.Jvm
1010
* The official `jpackage` docs: https://docs.oracle.com/en/java/javase/23/docs/specs/man/jpackage.html
1111
*/
1212
trait JpackageModule extends JavaModule {
13+
1314
/** The application name */
1415
def jpackageName: T[String] = Task { artifactName() }
1516

libs/javalib/src/mill/javalib/revapi/RevapiModule.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import mill.util.Jvm
1212
*/
1313
@mill.api.experimental // until Revapi has a stable release
1414
trait RevapiModule extends PublishModule {
15+
1516
/**
1617
* Runs [[revapiCliVersion Revapi CLI]] on this module's archives.
1718
*

libs/javalib/src/mill/javalib/spring/boot/SpringBootModule.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ trait SpringBootModule extends JavaModule {
179179
* parent module as a native GraalVM application, provided the [[outer.springBootProcessAOT]] works.
180180
*/
181181
trait NativeSpringBootBuildModule extends SpringBootOptimisedBuildModule, NativeImageModule {
182+
182183
/**
183184
* Uses the configuration path from both [[outer.springBootProcessAOT]] and
184185
* [[nativeMvnDepsMetadata]]

runner/launcher/src/mill/launcher/MillLauncherMain.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ object MillLauncherMain {
7373
MillProcessLauncher.loadMillConfig(ConfigConstants.millRepositories, workDir)
7474

7575
val runnerClasspath = CoursierClient.resolveMillDaemon(outMode, millRepositories)
76-
val optsArgs = MillProcessLauncher.loadMillConfig(ConfigConstants.millOpts, workDir) ++ args
76+
val optsArgs =
77+
MillProcessLauncher.loadMillConfig(ConfigConstants.millOpts, workDir) ++ args
7778
if (runNoDaemon) {
7879
val mainClass =
7980
if (bspMode) "mill.daemon.MillBspMain" else "mill.daemon.MillNoDaemonMain"

runner/launcher/src/mill/launcher/MillProcessLauncher.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ object MillProcessLauncher {
149149
(if (env.get(EnvVars.OS_LIB_PATH_RELATIVIZER_BASE).contains("")) Map.empty
150150
else Map(EnvVars.OS_LIB_PATH_RELATIVIZER_BASE -> relativizerBaseEnv)) ++
151151
Map(EnvVars.MILL_ENABLE_STATIC_CHECKS -> "true") ++ (
152-
if (env.contains(EnvVars.MILL_EXECUTABLE_PATH)) Map.empty
153-
else Map(EnvVars.MILL_EXECUTABLE_PATH -> getExecutablePath)
154-
) ++ {
155-
val jdkJavaOptions = env.getOrElse("JDK_JAVA_OPTIONS", "")
156-
val javaOpts = env.getOrElse("JAVA_OPTS", "")
157-
val opts = s"$jdkJavaOptions $javaOpts".trim
158-
if (opts.nonEmpty) Map("JDK_JAVA_OPTIONS" -> opts) else Map.empty
159-
}
152+
if (env.contains(EnvVars.MILL_EXECUTABLE_PATH)) Map.empty
153+
else Map(EnvVars.MILL_EXECUTABLE_PATH -> getExecutablePath)
154+
) ++ {
155+
val jdkJavaOptions = env.getOrElse("JDK_JAVA_OPTIONS", "")
156+
val javaOpts = env.getOrElse("JAVA_OPTS", "")
157+
val opts = s"$jdkJavaOptions $javaOpts".trim
158+
if (opts.nonEmpty) Map("JDK_JAVA_OPTIONS" -> opts) else Map.empty
159+
}
160160

161161
// destroyOnExit = false to prevent the daemon from being killed when the Mill client exits.
162162
// The daemon is a long-lived background process that should survive client disconnections.

0 commit comments

Comments
 (0)