Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ repos:
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: /test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
exclude: /test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
- id: end-of-file-fixer
exclude: Cargo.lock$|/test/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$
exclude: Cargo.lock$|/test([^/]*)/.*$(?<!\.qlref)|.*\.patch$|.*\.qll?$

- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.6
Expand Down
3 changes: 3 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ use_repo(
"kotlin-compiler-2.2.0-Beta1",
"kotlin-compiler-2.2.20-Beta2",
"kotlin-compiler-2.3.0",
"kotlin-compiler-2.3.20",
"kotlin-compiler-embeddable-1.8.0",
"kotlin-compiler-embeddable-1.9.0-Beta",
"kotlin-compiler-embeddable-1.9.20-Beta",
Expand All @@ -252,6 +253,7 @@ use_repo(
"kotlin-compiler-embeddable-2.2.0-Beta1",
"kotlin-compiler-embeddable-2.2.20-Beta2",
"kotlin-compiler-embeddable-2.3.0",
"kotlin-compiler-embeddable-2.3.20",
"kotlin-stdlib-1.8.0",
"kotlin-stdlib-1.9.0-Beta",
"kotlin-stdlib-1.9.20-Beta",
Expand All @@ -262,6 +264,7 @@ use_repo(
"kotlin-stdlib-2.2.0-Beta1",
"kotlin-stdlib-2.2.20-Beta2",
"kotlin-stdlib-2.3.0",
"kotlin-stdlib-2.3.20",
)

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
Expand Down
3 changes: 3 additions & 0 deletions java/kotlin-extractor/deps/kotlin-compiler-2.3.20.jar
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions java/kotlin-extractor/deps/kotlin-stdlib-2.3.20.jar
Git LFS file not shown
2 changes: 1 addition & 1 deletion java/kotlin-extractor/dev/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import io
import os

DEFAULT_VERSION = "2.3.10"
DEFAULT_VERSION = "2.3.20"


def options():
Expand Down
3 changes: 3 additions & 0 deletions java/kotlin-extractor/src/main/kotlin/utils/GetByFqName.kt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// referenceClass, referenceFunctions, referenceProperties are deprecated since Kotlin 2.3.20
@file:Suppress("DEPRECATION")

package com.github.codeql.utils

import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
Expand Down
1 change: 1 addition & 0 deletions java/kotlin-extractor/versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ VERSIONS = [
"2.2.0-Beta1",
"2.2.20-Beta2",
"2.3.0",
"2.3.20",
]

def _version_to_tuple(v):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.20.",
"markdownMessage": "The Kotlin version installed (`999.999.999`) is too recent for this version of CodeQL. Install a version lower than 2.3.30.",
"severity": "error",
"source": {
"extractorName": "java",
Expand Down
4 changes: 4 additions & 0 deletions java/ql/lib/change-notes/2026-03-26-kotlin-2.3.20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Kotlin versions up to 2.3.20 are now supported.
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ def.kt:
# 46| 2: [Method] fn
#-----| 1: (Annotations)
# 45| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
#-----| 2: (Generic Parameters)
# 46| 0: [TypeVariable] T
# 46| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 46| 0: [Parameter] a
#-----| -1: (Annotations)
# 46| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
# 46| 0: [TypeAccess] Annot0k
# 46| 5: [BlockStmt] { ... }
# 47| 0: [ExprStmt] <Expr>;
Expand All @@ -44,25 +44,25 @@ def.kt:
# 50| 1: [LocalVariableDeclStmt] var ...;
# 50| 1: [LocalVariableDeclExpr] x
# 50| 0: [IntegerLiteral] 10
# 57| 3: [Method] getP
# 53| 3: [FieldDeclaration] int p;
#-----| -2: (Annotations)
# 56| 1: [Annotation] Annot0k
# 0| 1: [IntegerLiteral] 0
# 53| -1: [TypeAccess] int
# 57| 0: [IntegerLiteral] 5
# 57| 4: [Method] getP
#-----| 1: (Annotations)
# 54| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
# 57| 3: [TypeAccess] int
# 57| 5: [BlockStmt] { ... }
# 57| 0: [ReturnStmt] return ...
# 57| 0: [VarAccess] DefKt.p
# 57| -1: [TypeAccess] DefKt
# 57| 4: [FieldDeclaration] int p;
#-----| -2: (Annotations)
# 56| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 57| -1: [TypeAccess] int
# 57| 0: [IntegerLiteral] 5
# 57| 5: [Method] setP
#-----| 1: (Annotations)
# 55| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
# 57| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 57| 0: [Parameter] <set-?>
Expand All @@ -79,7 +79,7 @@ def.kt:
# 59| 0: [Parameter] <this>
#-----| -1: (Annotations)
# 59| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
# 59| 0: [TypeAccess] String
# 59| 5: [BlockStmt] { ... }
# 5| 2: [Interface] Annot0k
Expand Down Expand Up @@ -111,32 +111,32 @@ def.kt:
# 5| 1: [ArrayInit] {...}
# 5| 1: [VarAccess] AnnotationTarget.CLASS
# 5| -1: [TypeAccess] AnnotationTarget
# 6| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
# 6| -1: [TypeAccess] AnnotationTarget
# 7| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
# 7| -1: [TypeAccess] AnnotationTarget
# 8| 4: [VarAccess] AnnotationTarget.PROPERTY
# 8| -1: [TypeAccess] AnnotationTarget
# 9| 5: [VarAccess] AnnotationTarget.FIELD
# 9| -1: [TypeAccess] AnnotationTarget
# 10| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
# 10| -1: [TypeAccess] AnnotationTarget
# 11| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
# 11| -1: [TypeAccess] AnnotationTarget
# 12| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
# 12| -1: [TypeAccess] AnnotationTarget
# 13| 9: [VarAccess] AnnotationTarget.FUNCTION
# 13| -1: [TypeAccess] AnnotationTarget
# 14| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
# 14| -1: [TypeAccess] AnnotationTarget
# 15| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
# 15| -1: [TypeAccess] AnnotationTarget
# 16| 12: [VarAccess] AnnotationTarget.TYPE
# 16| -1: [TypeAccess] AnnotationTarget
# 18| 13: [VarAccess] AnnotationTarget.FILE
# 18| -1: [TypeAccess] AnnotationTarget
# 19| 14: [VarAccess] AnnotationTarget.TYPEALIAS
# 19| -1: [TypeAccess] AnnotationTarget
# 5| 2: [VarAccess] AnnotationTarget.ANNOTATION_CLASS
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 3: [VarAccess] AnnotationTarget.TYPE_PARAMETER
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 4: [VarAccess] AnnotationTarget.PROPERTY
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 5: [VarAccess] AnnotationTarget.FIELD
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 6: [VarAccess] AnnotationTarget.LOCAL_VARIABLE
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 7: [VarAccess] AnnotationTarget.VALUE_PARAMETER
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 8: [VarAccess] AnnotationTarget.CONSTRUCTOR
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 9: [VarAccess] AnnotationTarget.FUNCTION
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 10: [VarAccess] AnnotationTarget.PROPERTY_GETTER
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 11: [VarAccess] AnnotationTarget.PROPERTY_SETTER
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 12: [VarAccess] AnnotationTarget.TYPE
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 13: [VarAccess] AnnotationTarget.FILE
# 5| -1: [TypeAccess] AnnotationTarget
# 5| 14: [VarAccess] AnnotationTarget.TYPEALIAS
# 5| -1: [TypeAccess] AnnotationTarget
# 21| 1: [Method] a
#-----| 1: (Annotations)
# 21| 1: [Annotation] JvmName
Expand All @@ -148,7 +148,7 @@ def.kt:
# 0| 1: [VarAccess] RetentionPolicy.RUNTIME
# 0| -1: [TypeAccess] RetentionPolicy
# 23| 2: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 0| 1: [IntegerLiteral] 0
# 25| 1: [Method] a
# 25| 3: [TypeAccess] int
# 26| 2: [Method] b
Expand All @@ -175,15 +175,15 @@ def.kt:
# 0| 3: [Method] valueOf
# 0| 3: [TypeAccess] Y
#-----| 4: (Parameters)
# 34| 0: [Parameter] value
# 34| 0: [TypeAccess] String
# 0| 0: [Parameter] value
# 0| 0: [TypeAccess] String
# 0| 4: [Method] values
# 0| 3: [TypeAccess] Y[]
# 0| 0: [TypeAccess] Y
# 34| 5: [Constructor] Y
# 34| 5: [BlockStmt] { ... }
# 34| 0: [ExprStmt] <Expr>;
# 34| 0: [ClassInstanceExpr] new Enum<Y>(...)
# 34| 0: [ClassInstanceExpr] new Enum(...)
# 34| -3: [TypeAccess] Enum<Y>
# 34| 0: [TypeAccess] Y
# 34| 0: [NullLiteral] null
Expand All @@ -206,12 +206,12 @@ def.kt:
# 38| 1: [Annotation] Annot0k
# 38| 1: [IntegerLiteral] 1
# 39| 2: [Annotation] Annot1k
# 25| 1: [IntegerLiteral] 2
# 26| 2: [StringLiteral] "ab"
# 27| 3: [TypeLiteral] X.class
# 27| 0: [TypeAccess] X
# 30| 4: [Annotation] Annot0k
# 30| 1: [IntegerLiteral] 1
# 0| 1: [IntegerLiteral] 2
# 0| 2: [StringLiteral] "ab"
# 0| 3: [TypeLiteral] X.class
# 0| 0: [TypeAccess] X
# 0| 4: [Annotation] Annot0k
# 0| 1: [IntegerLiteral] 1
# 39| 5: [VarAccess] Y.B
# 39| -1: [TypeAccess] Y
# 39| 6: [ArrayInit] {...}
Expand All @@ -222,8 +222,8 @@ def.kt:
# 42| 1: [Constructor] Z
#-----| 1: (Annotations)
# 41| 1: [Annotation] Annot0k
# 21| 1: [IntegerLiteral] 0
# 42| 5: [BlockStmt] { ... }
# 0| 1: [IntegerLiteral] 0
# 41| 5: [BlockStmt] { ... }
# 42| 0: [SuperConstructorInvocationStmt] super(...)
# 42| 1: [BlockStmt] { ... }
use.java:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ annotationDeclarations
| def.kt:23:1:31:1 | Annot1k | def.kt:29:5:29:32 | e |
| def.kt:23:1:31:1 | Annot1k | def.kt:30:5:30:31 | f |
annotations
| def.kt:0:0:0:0 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
| def.kt:23:1:23:8 | Annot0k | def.kt:23:1:31:1 | Annot1k | def.kt:5:1:21:60 | Annot0k |
| def.kt:30:22:30:31 | Annot0k | def.kt:39:1:39:40 | Annot1k | def.kt:5:1:21:60 | Annot0k |
| def.kt:38:1:38:17 | Annot0k | def.kt:38:1:43:1 | Z | def.kt:5:1:21:60 | Annot0k |
| def.kt:39:1:39:40 | Annot1k | def.kt:38:1:43:1 | Z | def.kt:23:1:31:1 | Annot1k |
| def.kt:41:5:41:12 | Annot0k | def.kt:42:5:42:19 | Z | def.kt:5:1:21:60 | Annot0k |
| def.kt:45:1:45:8 | Annot0k | def.kt:46:1:51:1 | fn | def.kt:5:1:21:60 | Annot0k |
| def.kt:46:21:46:28 | Annot0k | def.kt:46:21:46:39 | a | def.kt:5:1:21:60 | Annot0k |
| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:19 | getP | def.kt:5:1:21:60 | Annot0k |
| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:19 | setP | def.kt:5:1:21:60 | Annot0k |
| def.kt:56:1:56:14 | Annot0k | def.kt:57:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
| def.kt:54:1:54:12 | Annot0k | def.kt:57:1:57:23 | getP | def.kt:5:1:21:60 | Annot0k |
| def.kt:55:1:55:12 | Annot0k | def.kt:57:1:57:23 | setP | def.kt:5:1:21:60 | Annot0k |
| def.kt:56:1:56:14 | Annot0k | def.kt:53:1:57:23 | p | def.kt:5:1:21:60 | Annot0k |
| def.kt:59:5:59:21 | Annot0k | def.kt:59:5:59:28 | <this> | def.kt:5:1:21:60 | Annot0k |
| use.java:10:5:10:21 | Annot0j | use.java:14:18:14:18 | Z | Annot0j.java:1:19:1:25 | Annot0j |
| use.java:11:5:11:90 | Annot1j | use.java:14:18:14:18 | Z | Annot1j.java:1:19:1:25 | Annot1j |
Expand All @@ -43,27 +43,27 @@ annotations
| use.java:13:5:13:88 | Annot1k | use.java:14:18:14:18 | Z | def.kt:23:1:31:1 | Annot1k |
| use.java:13:73:13:87 | Annot0k | use.java:13:5:13:88 | Annot1k | def.kt:5:1:21:60 | Annot0k |
annotationValues
| def.kt:0:0:0:0 | Annot0k | def.kt:0:0:0:0 | 1 |
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
| def.kt:0:0:0:0 | Retention | def.kt:0:0:0:0 | RetentionPolicy.RUNTIME |
| def.kt:0:0:0:0 | Target | def.kt:0:0:0:0 | {...} |
| def.kt:5:1:20:1 | Target | def.kt:5:9:19:30 | {...} |
| def.kt:5:1:20:1 | Target | def.kt:5:9:5:30 | {...} |
| def.kt:21:26:21:42 | JvmName | def.kt:21:39:21:41 | "a" |
| def.kt:23:1:23:8 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:30:22:30:31 | Annot0k | def.kt:30:30:30:30 | 1 |
| def.kt:23:1:23:8 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:38:1:38:17 | Annot0k | def.kt:38:16:38:16 | 1 |
| def.kt:39:1:39:40 | Annot1k | def.kt:25:18:25:18 | 2 |
| def.kt:39:1:39:40 | Annot1k | def.kt:26:21:26:24 | "ab" |
| def.kt:39:1:39:40 | Annot1k | def.kt:27:24:27:31 | X.class |
| def.kt:39:1:39:40 | Annot1k | def.kt:30:22:30:31 | Annot0k |
| def.kt:39:1:39:40 | Annot1k | def.kt:39:16:39:16 | Y.B |
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | 2 |
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | "ab" |
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | Annot0k |
| def.kt:39:1:39:40 | Annot1k | def.kt:0:0:0:0 | X.class |
| def.kt:39:1:39:40 | Annot1k | def.kt:39:14:39:16 | Y.B |
| def.kt:39:1:39:40 | Annot1k | def.kt:39:23:39:39 | {...} |
| def.kt:41:5:41:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:45:1:45:8 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:46:21:46:28 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:54:1:54:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:55:1:55:12 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:56:1:56:14 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:59:5:59:21 | Annot0k | def.kt:21:59:21:59 | 0 |
| def.kt:41:5:41:12 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:45:1:45:8 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:46:21:46:28 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:54:1:54:12 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:55:1:55:12 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:56:1:56:14 | Annot0k | def.kt:0:0:0:0 | 0 |
| def.kt:59:5:59:21 | Annot0k | def.kt:0:0:0:0 | 0 |
| use.java:10:5:10:21 | Annot0j | use.java:10:20:10:20 | 1 |
| use.java:11:5:11:90 | Annot1j | use.java:11:18:11:18 | 1 |
| use.java:11:5:11:90 | Annot1j | use.java:11:25:11:28 | "ac" |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
| Test.java:2:17:2:17 | m | m | m |
| test.kt:3:9:4:18 | getX_prop | getX_prop | getX |
| test.kt:4:9:4:18 | getX_prop | getX_prop | getX |
| test.kt:6:5:6:19 | getX | getX | getX |
| test.kt:10:5:10:14 | changeY | changeY | setY |
| test.kt:10:5:10:14 | y | y | getY |
| test.kt:10:5:10:19 | changeY | changeY | setY |
| test.kt:10:5:10:19 | y | y | getY |
| test.kt:13:5:13:15 | method | method | fn |
| test.kt:17:5:17:14 | p | p | p |
| test.kt:18:23:18:32 | w | w | q |
Loading
Loading