Skip to content

Commit bb2208c

Browse files
authored
Suppress REDUNDANT_CALL_OF_CONVERSION_METHOD (#326)
1 parent 6e0cbf4 commit bb2208c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ class SuiteSourceGenerator(
8383

8484
val mainBenchmarkPackage = "kotlinx.benchmark.generated"
8585

86-
val suppressUnusedParameter = AnnotationSpec.builder(Suppress::class).addMember("\"UNUSED_PARAMETER\"").build()
86+
val suppressWarnings = AnnotationSpec.builder(Suppress::class).addMember(
87+
"\"UNUSED_PARAMETER\", \"REDUNDANT_CALL_OF_CONVERSION_METHOD\""
88+
).build()
8789
val optInRuntimeInternalApi = AnnotationSpec.builder(ClassName("kotlin", "OptIn")).addMember(
8890
"kotlinx.benchmark.internal.KotlinxBenchmarkRuntimeInternalApi::class"
8991
).build()
@@ -193,7 +195,7 @@ class SuiteSourceGenerator(
193195

194196
val file = FileSpec.builder(benchmarkPackageName, benchmarkName).apply {
195197
declareObject(benchmarkClass) {
196-
addAnnotation(suppressUnusedParameter)
198+
addAnnotation(suppressWarnings)
197199
addAnnotation(optInRuntimeInternalApi)
198200

199201
function(setupFunctionName) {

0 commit comments

Comments
 (0)