mirror of
https://github.com/apple/pkl.git
synced 2026-06-08 23:02:45 +02: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.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()
|
||||
|
||||
+3
-3
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user