From 16da5553dc8ebaec63c6328f2d0d2a3caba8a65b Mon Sep 17 00:00:00 2001 From: Filipp Zhinkin Date: Mon, 6 Oct 2025 15:45:10 -0400 Subject: [PATCH 1/2] Suppress REDUNDANT_CALL_OF_CONVERSION_METHOD --- .../src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt b/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt index 0caae331..8a33c4ea 100644 --- a/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt +++ b/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt @@ -83,7 +83,10 @@ class SuiteSourceGenerator( val mainBenchmarkPackage = "kotlinx.benchmark.generated" - val suppressUnusedParameter = AnnotationSpec.builder(Suppress::class).addMember("\"UNUSED_PARAMETER\"").build() + val suppressWarnings = AnnotationSpec.builder(Suppress::class).addMember( + "\"UNUSED_PARAMETER\"", + "\"REDUNDANT_CALL_OF_CONVERSION_METHOD\"" + ).build() val optInRuntimeInternalApi = AnnotationSpec.builder(ClassName("kotlin", "OptIn")).addMember( "kotlinx.benchmark.internal.KotlinxBenchmarkRuntimeInternalApi::class" ).build() @@ -193,7 +196,7 @@ class SuiteSourceGenerator( val file = FileSpec.builder(benchmarkPackageName, benchmarkName).apply { declareObject(benchmarkClass) { - addAnnotation(suppressUnusedParameter) + addAnnotation(suppressWarnings) addAnnotation(optInRuntimeInternalApi) function(setupFunctionName) { From 47b84900f283b3b284be8808261e7fcaeee435c1 Mon Sep 17 00:00:00 2001 From: Filipp Zhinkin Date: Mon, 6 Oct 2025 16:17:25 -0400 Subject: [PATCH 2/2] fixup! Suppress REDUNDANT_CALL_OF_CONVERSION_METHOD --- .../main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt b/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt index 8a33c4ea..992851da 100644 --- a/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt +++ b/plugin/main/src/kotlinx/benchmark/gradle/SuiteSourceGenerator.kt @@ -84,8 +84,7 @@ class SuiteSourceGenerator( val mainBenchmarkPackage = "kotlinx.benchmark.generated" val suppressWarnings = AnnotationSpec.builder(Suppress::class).addMember( - "\"UNUSED_PARAMETER\"", - "\"REDUNDANT_CALL_OF_CONVERSION_METHOD\"" + "\"UNUSED_PARAMETER\", \"REDUNDANT_CALL_OF_CONVERSION_METHOD\"" ).build() val optInRuntimeInternalApi = AnnotationSpec.builder(ClassName("kotlin", "OptIn")).addMember( "kotlinx.benchmark.internal.KotlinxBenchmarkRuntimeInternalApi::class"