mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 14:20:35 +01:00
Address warning diagnostics (#1395)
This addressess various warning diagnostics throughout the codebase.
This commit is contained in:
@@ -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.*
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user