Kotlin: Fix bazel format and address copilot review comments

This commit is contained in:
Anders Fugmann
2025-12-05 09:21:39 +01:00
parent ecc8a91f7b
commit 2e8db582f4
3 changed files with 2 additions and 5 deletions

View File

@@ -124,8 +124,6 @@ kt_javac_options(
javac_opts = ":javac-options", javac_opts = ":javac-options",
kotlinc_opts = ":kotlinc-options-%s" % v, kotlinc_opts = ":kotlinc-options-%s" % v,
module_name = "codeql-kotlin-extractor", 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 = [
":resources-%s" % v, ":resources-%s" % v,
], ],

View File

@@ -2975,7 +2975,7 @@ open class KotlinFileExtractor(
val locId = tw.getLocation(s) val locId = tw.getLocation(s)
tw.writeStmts_block(blockId, parent, idx, callable) tw.writeStmts_block(blockId, parent, idx, callable)
tw.writeHasLocation(blockId, locId) 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 // as a workaround to silence warnings for kotlin < 2.3 about the elvis
// operator being redundant. // operator being redundant.
// For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning // For Kotlin >= 2.3, the cast is redundant, so we need to silence that warning

View File

@@ -7,7 +7,6 @@ module(
bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_skylib", version = "1.7.1") 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_java", version = "7.2.0")
bazel_dep(name = "rules_android", version = "0.6.4") bazel_dep(name = "rules_android", version = "0.6.4")
bazel_dep(name = "bazel_features", version = "1.25.0") bazel_dep(name = "bazel_features", version = "1.25.0")
@@ -28,10 +27,10 @@ use_repo(
"com_github_google_ksp", "com_github_google_ksp",
"com_github_jetbrains_kotlin", "com_github_jetbrains_kotlin",
"com_github_pinterest_ktlint", "com_github_pinterest_ktlint",
"kotlin_build_tools_impl",
"kotlinx_serialization_core_jvm", "kotlinx_serialization_core_jvm",
"kotlinx_serialization_json", "kotlinx_serialization_json",
"kotlinx_serialization_json_jvm", "kotlinx_serialization_json_jvm",
"kotlin_build_tools_impl",
) )
register_toolchains("//kotlin/internal:default_toolchain") register_toolchains("//kotlin/internal:default_toolchain")