Address warning diagnostics (#1395)

This addressess various warning diagnostics throughout the codebase.
This commit is contained in:
Daniel Chao
2026-01-07 22:11:24 -08:00
committed by GitHub
parent 474305c7b9
commit 14d58a17b0
63 changed files with 387 additions and 371 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 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.
@@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:Suppress("unused")
package org.pkl.codegen.java
import com.palantir.javapoet.*

View File

@@ -1,5 +1,5 @@
/*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 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.
@@ -595,10 +595,7 @@ class JavaCodeGeneratorTest {
assertAll(
"toString() returns Pkl name",
javaClass.enumConstants.zip(cases) { enumConstant, (pklName, _) ->
{
assertThat(enumConstant.toString()).isEqualTo(pklName)
Unit
}
{ assertThat(enumConstant.toString()).isEqualTo(pklName) }
},
)
}
@@ -2264,7 +2261,7 @@ class JavaCodeGeneratorTest {
}
private fun Map<String, String>.validateContents(
vararg assertions: kotlin.Pair<String, List<String>>
@Suppress("RemoveRedundantQualifierName") vararg assertions: kotlin.Pair<String, List<String>>
) {
val files = toMutableMap()
@@ -2289,7 +2286,7 @@ class JavaCodeGeneratorTest {
}
private fun JavaCodeGeneratorOptions.generateFiles(
vararg pklModules: kotlin.Pair<String, String>
@Suppress("RemoveRedundantQualifierName") vararg pklModules: kotlin.Pair<String, String>
): Map<String, String> =
generateFiles(*pklModules.map { (name, text) -> PklModule(name, text) }.toTypedArray())