Run spotless formatting (#958)

When we updated spotless's Java and Kotlin formatter, we changed the underlying
formatting rules.
However, due to spotless ratcheting, these formatting changes don't get applied unless a file
gets touched in a commit.

To avoid future PRs introducing lines of change that aren't related to the intention of the PR,
this is a one-time format of all files.
This commit is contained in:
Daniel Chao
2025-02-17 07:36:43 -08:00
committed by GitHub
parent d270829ed3
commit 28b128f86f
79 changed files with 679 additions and 682 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ open class CliException(
message: String,
/** The process exit code to use. */
val exitCode: Int = 1
val exitCode: Int = 1,
) : RuntimeException(message) {
override fun toString(): String = message!!
@@ -39,7 +39,7 @@ class CliBugException(
private val theCause: Exception,
/** The process exit code to use. */
exitCode: Int = 1
exitCode: Int = 1,
) :
CliException("An unexpected error has occurred. Would you mind filing a bug report?", exitCode) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@ fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.single(): NullableOption
*/
fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.splitAll(
separator: String = ",",
default: List<ValueT> = emptyList()
default: List<ValueT> = emptyList(),
): OptionWithValues<List<ValueT>, List<ValueT>, ValueT> {
return copy(
transformValue = transformValue,
@@ -44,6 +44,6 @@ fun <EachT : Any, ValueT> NullableOption<EachT, ValueT>.splitAll(
transformAll = { it.flatten().ifEmpty { default } },
validator = {},
nvalues = 1,
valueSplit = Regex.fromLiteral(separator)
valueSplit = Regex.fromLiteral(separator),
)
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ class ProjectOptions : OptionGroup() {
names = arrayOf("--project-dir"),
metavar = "<path>",
help =
"The project directory to use for this command. By default, searches up from the working directory for a PklProject file."
"The project directory to use for this command. By default, searches up from the working directory for a PklProject file.",
)
.single()
.path()
@@ -39,7 +39,7 @@ class ProjectOptions : OptionGroup() {
val omitProjectSettings: Boolean by
option(
names = arrayOf("--omit-project-settings"),
help = "Ignores evaluator settings set in the PklProject file."
help = "Ignores evaluator settings set in the PklProject file.",
)
.single()
.flag(default = false)
@@ -47,7 +47,7 @@ class ProjectOptions : OptionGroup() {
val noProject: Boolean by
option(
names = arrayOf("--no-project"),
help = "Disables loading settings and dependencies from the PklProject file."
help = "Disables loading settings and dependencies from the PklProject file.",
)
.single()
.flag(default = false)

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,7 @@ class TestOptions : OptionGroup() {
option(
names = arrayOf("--junit-reports"),
metavar = "<dir>",
help = "Directory where to store JUnit reports."
help = "Directory where to store JUnit reports.",
)
.path()