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
@@ -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.kotlin
import com.squareup.kotlinpoet.*
@@ -66,6 +68,7 @@ class KotlinCodeGenerator(
private val STRING = String::class.asClassName()
private val ANY_NULL = ANY.copy(nullable = true)
private val NOTHING = Nothing::class.asClassName()
@Suppress("RemoveRedundantQualifierName")
private val KOTLIN_PAIR = kotlin.Pair::class.asClassName()
private val COLLECTION = Collection::class.asClassName()
private val LIST = List::class.asClassName()
@@ -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.
@@ -2054,7 +2054,7 @@ class KotlinCodeGeneratorTest {
}
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()
@@ -2079,7 +2079,7 @@ class KotlinCodeGeneratorTest {
}
private fun KotlinCodeGeneratorOptions.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())