From b8d01ed21b0e2b1d6971014763f15634f708d7b3 Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Fri, 5 Dec 2025 09:21:39 +0100 Subject: [PATCH] Kotlin: Fix bazel format and address copilot review comments --- java/kotlin-extractor/BUILD.bazel | 2 -- java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt | 2 +- .../registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/java/kotlin-extractor/BUILD.bazel b/java/kotlin-extractor/BUILD.bazel index ab265dd946e..665155d49f2 100644 --- a/java/kotlin-extractor/BUILD.bazel +++ b/java/kotlin-extractor/BUILD.bazel @@ -124,8 +124,6 @@ kt_javac_options( javac_opts = ":javac-options", kotlinc_opts = ":kotlinc-options-%s" % v, module_name = "codeql-kotlin-extractor", - # resource_strip_prefix is very nit-picky: the following makes it work from - # `codeql`, `@codeql_kotlin_embeddable` and `semmle-code` resources = [ ":resources-%s" % v, ], diff --git a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt index fc22eda04d4..af8015fa457 100644 --- a/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt +++ b/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt @@ -2975,7 +2975,7 @@ open class KotlinFileExtractor( val locId = tw.getLocation(s) tw.writeStmts_block(blockId, parent, idx, callable) tw.writeHasLocation(blockId, locId) - // For Kotlin < 2.3, s.deligate is not-nullable. Cast to a be nullable, + // For Kotlin < 2.3, s.delegate is not-nullable. Cast to a be nullable, // as a workaround to silence warnings for kotlin < 2.3 about the elvis // operator being redundant. // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning diff --git a/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel index f0876478fe9..df66ce2051a 100644 --- a/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel +++ b/misc/bazel/registry/modules/rules_kotlin/2.2.0-codeql.1/MODULE.bazel @@ -7,7 +7,6 @@ module( bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "bazel_skylib", version = "1.7.1") -# bazel_dep(name = "rules_java", version = "7.2.0") bazel_dep(name = "rules_java", version = "7.2.0") bazel_dep(name = "rules_android", version = "0.6.4") bazel_dep(name = "bazel_features", version = "1.25.0") @@ -28,10 +27,10 @@ use_repo( "com_github_google_ksp", "com_github_jetbrains_kotlin", "com_github_pinterest_ktlint", + "kotlin_build_tools_impl", "kotlinx_serialization_core_jvm", "kotlinx_serialization_json", "kotlinx_serialization_json_jvm", - "kotlin_build_tools_impl", ) register_toolchains("//kotlin/internal:default_toolchain")