mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Merge pull request #10959 from igfoo/igfoo/diags
Java/Kotlin: Add a diagnostics consistency query
This commit is contained in:
@@ -277,7 +277,7 @@ public class OdasaOutput {
|
|||||||
// Only re-write an existing trap file if we encountered a newer version of the same class.
|
// Only re-write an existing trap file if we encountered a newer version of the same class.
|
||||||
TrapClassVersion trapVersion = readVersionInfo(trap);
|
TrapClassVersion trapVersion = readVersionInfo(trap);
|
||||||
if (!currVersion.isValid()) {
|
if (!currVersion.isValid()) {
|
||||||
log.warn("Not rewriting trap file for: " + shortName + " " + trapVersion + " " + currVersion + " " + trap);
|
log.trace("Not rewriting trap file for: " + shortName + " " + trapVersion + " " + currVersion + " " + trap);
|
||||||
} else if (currVersion.newerThan(trapVersion)) {
|
} else if (currVersion.newerThan(trapVersion)) {
|
||||||
log.trace("Rewriting trap file for: " + shortName + " " + trapVersion + " " + currVersion + " " + trap);
|
log.trace("Rewriting trap file for: " + shortName + " " + trapVersion + " " + currVersion + " " + trap);
|
||||||
deleteTrapFileAndDependencies(sym, signature);
|
deleteTrapFileAndDependencies(sym, signature);
|
||||||
@@ -291,7 +291,7 @@ public class OdasaOutput {
|
|||||||
// If the TRAP file already exists then we
|
// If the TRAP file already exists then we
|
||||||
// don't need to write it.
|
// don't need to write it.
|
||||||
if (trap.exists()) {
|
if (trap.exists()) {
|
||||||
log.warn("Not rewriting trap file for " + trap.toString() + " as it exists");
|
log.trace("Not rewriting trap file for " + trap.toString() + " as it exists");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// If the TRAP file was written in the past, and
|
// If the TRAP file was written in the past, and
|
||||||
@@ -301,7 +301,7 @@ public class OdasaOutput {
|
|||||||
File trapFileDir = trap.getParentFile();
|
File trapFileDir = trap.getParentFile();
|
||||||
File trapOld = new File(trapFileDir, trap.getName().replace(".trap.gz", ".trap-old.gz"));
|
File trapOld = new File(trapFileDir, trap.getName().replace(".trap.gz", ".trap-old.gz"));
|
||||||
if (trapOld.exists()) {
|
if (trapOld.exists()) {
|
||||||
log.warn("Not rewriting trap file for " + trap.toString() + " as the trap-old exists");
|
log.trace("Not rewriting trap file for " + trap.toString() + " as the trap-old exists");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
// Otherwise, if any newer TRAP file has already
|
// Otherwise, if any newer TRAP file has already
|
||||||
@@ -316,7 +316,7 @@ public class OdasaOutput {
|
|||||||
if (m.matches() && m.group(1).equals(trapFileBaseName)) {
|
if (m.matches() && m.group(1).equals(trapFileBaseName)) {
|
||||||
TrapClassVersion v = new TrapClassVersion(Integer.valueOf(m.group(2)), Integer.valueOf(m.group(3)), Long.valueOf(m.group(4)), m.group(5));
|
TrapClassVersion v = new TrapClassVersion(Integer.valueOf(m.group(2)), Integer.valueOf(m.group(3)), Long.valueOf(m.group(4)), m.group(5));
|
||||||
if (v.newerThan(trapFileVersion)) {
|
if (v.newerThan(trapFileVersion)) {
|
||||||
log.warn("Not rewriting trap file for " + trap.toString() + " as " + f.toString() + " exists");
|
log.trace("Not rewriting trap file for " + trap.toString() + " as " + f.toString() + " exists");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
34
java/ql/consistency-queries/diags.ql
Normal file
34
java/ql/consistency-queries/diags.ql
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import semmle.code.java.Diagnostics
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This query fails if any unexpected diagnostics are recorded in the
|
||||||
|
* database. By putting
|
||||||
|
* // Diagnostic Matches: PAT
|
||||||
|
* in any source files, you can declare that diagnostics matching PAT
|
||||||
|
* (in the string.matches(string) sense) are expected.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class DiagnosticException extends Top {
|
||||||
|
string pattern;
|
||||||
|
|
||||||
|
DiagnosticException() {
|
||||||
|
this.(KtComment).getText() = "// Diagnostic Matches: " + pattern
|
||||||
|
or
|
||||||
|
this.(Javadoc).toString() = "// Diagnostic Matches: " + pattern
|
||||||
|
}
|
||||||
|
|
||||||
|
Diagnostic getException() { diagnosticMessage(result).matches(pattern) }
|
||||||
|
}
|
||||||
|
|
||||||
|
string diagnosticMessage(Diagnostic d) {
|
||||||
|
if d.getFullMessage() != "" then result = d.getFullMessage() else result = d.getMessage()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check that there aren't any old DiagnosticExceptions left after
|
||||||
|
// something is fixed.
|
||||||
|
query predicate unusedDiagnosticException(DiagnosticException de) { not exists(de.getException()) }
|
||||||
|
|
||||||
|
query predicate unexpectedDiagnostic(Diagnostic d, string s) {
|
||||||
|
s = diagnosticMessage(d) and
|
||||||
|
not d = any(DiagnosticException de).getException()
|
||||||
|
}
|
||||||
@@ -1,3 +1 @@
|
|||||||
| CodeQL Kotlin extractor | 2 | | IrProperty without a getter | d.kt:0:0:0:0 | d.kt:0:0:0:0 |
|
| CodeQL Kotlin extractor | 2 | | IrProperty without a getter | d.kt:0:0:0:0 | d.kt:0:0:0:0 |
|
||||||
| CodeQL Kotlin extractor | 2 | | Not rewriting trap file for test-db/trap/java/classes/java/lang/Boolean.members/Boolean.members<VERSION>-<MODIFIED>-kotlin.trap.gz as it exists | file://:0:0:0:0 | file://:0:0:0:0 |
|
|
||||||
| CodeQL Kotlin extractor | 2 | | Not rewriting trap file for test-db/trap/java/classes/kotlin/Boolean.members/Boolean.members<VERSION>-<MODIFIED>-null.trap.gz as it exists | file://:0:0:0:0 | file://:0:0:0:0 |
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
annotation class SomeAnnotation
|
annotation class SomeAnnotation
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
|||||||
@@ -15,4 +15,12 @@ class X {
|
|||||||
|
|
||||||
annotation class Ann(
|
annotation class Ann(
|
||||||
val p: Int,
|
val p: Int,
|
||||||
@get:JvmName("w") val q: Int)
|
@get:JvmName("w") val q: Int)
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.jvm.JvmName(name="changeY")
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.jvm.JvmName(name="getX_prop")
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.jvm.JvmName(name="method")
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.jvm.JvmName(name="y")
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.jvm.JvmName
|
||||||
|
|||||||
@@ -110,3 +110,8 @@ public class TakesArrayList {
|
|||||||
fun inInArrayComparableAny(c: Comparable<Array<in Array<in Any>>>) { }
|
fun inInArrayComparableAny(c: Comparable<Array<in Array<in Any>>>) { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.NotNull
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ comments
|
|||||||
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | /**\n * An anonymous function comment\n */ |
|
| comments.kt:71:9:73:11 | /**\n * An anonymous function comment\n */ | /**\n * An anonymous function comment\n */ |
|
||||||
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | /**\n * A local function comment\n */ |
|
| comments.kt:79:9:81:11 | /**\n * A local function comment\n */ | /**\n * A local function comment\n */ |
|
||||||
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | /**\n * An anonymous object comment\n */ |
|
| comments.kt:88:10:90:11 | /**\n * An anonymous object comment\n */ | /**\n * An anonymous object comment\n */ |
|
||||||
|
| comments.kt:95:1:95:163 | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% |
|
||||||
commentOwners
|
commentOwners
|
||||||
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
|
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
|
||||||
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
|
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | comments.kt:12:1:31:1 | Group |
|
||||||
@@ -39,6 +40,7 @@ commentNoOwners
|
|||||||
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ |
|
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ |
|
||||||
| comments.kt:24:9:24:25 | // A line comment |
|
| comments.kt:24:9:24:25 | // A line comment |
|
||||||
| comments.kt:28:5:30:6 | /*\n A block comment\n */ |
|
| comments.kt:28:5:30:6 | /*\n A block comment\n */ |
|
||||||
|
| comments.kt:95:1:95:163 | // Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0% |
|
||||||
commentSections
|
commentSections
|
||||||
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ | Kdoc with no owner |
|
| comments.kt:1:1:1:25 | /** Kdoc with no owner */ | Kdoc with no owner |
|
||||||
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | A group of *members*.\n\nThis class has no useful logic; it's just a documentation example.\n\n |
|
| comments.kt:4:1:11:3 | /**\n * A group of *members*.\n *\n * This class has no useful logic; it's just a documentation example.\n *\n * @property name the name of this group.\n * @constructor Creates an empty group.\n */ | A group of *members*.\n\nThis class has no useful logic; it's just a documentation example.\n\n |
|
||||||
|
|||||||
@@ -90,4 +90,6 @@ class XX {
|
|||||||
*/
|
*/
|
||||||
X() {
|
X() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (comments.kt) at %comments.kt:1:1:96:0%
|
||||||
|
|||||||
@@ -122,3 +122,5 @@ fun fn_when(x: Boolean, y: Boolean) {
|
|||||||
else -> false
|
else -> false
|
||||||
} -> { } }
|
} -> { } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer ...while extracting a call (<no name>) at %Test.kt:40:4:40:6%
|
||||||
|
|||||||
@@ -98,3 +98,5 @@ TODO
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer ...while extracting a call (<no name>) at %Test.kt:40:4:40:6%
|
||||||
|
|||||||
@@ -35,3 +35,5 @@ public class Test2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer ...while extracting a call (<no name>) at %Test2.kt:34:4:34:6%
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ public fun <T> CoroutineScope.async(
|
|||||||
block: suspend CoroutineScope.() -> T
|
block: suspend CoroutineScope.() -> T
|
||||||
): Deferred<T> {
|
): Deferred<T> {
|
||||||
return null!!
|
return null!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't get owner of KDoc. The comment is extracted without an owner. ...while extracting a file (kotlinx_coroutines_stubs.kt) at %kotlinx_coroutines_stubs.kt:1:1:36:0%
|
||||||
|
|||||||
@@ -338,3 +338,15 @@ fun unaryExprs(i: Int, d: Double, b: Byte, s: Short, l: Long, f: Float) {
|
|||||||
+f
|
+f
|
||||||
-f
|
-f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.dec in java.lang.Byte %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.inc in java.lang.Byte %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.inc in java.lang.Integer %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Int.rangeTo in java.lang.Integer %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Short.inc in java.lang.Short %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Short.dec in java.lang.Short %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Long.dec in java.lang.Long %
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Long.inc in java.lang.Long %
|
||||||
|
|||||||
@@ -29,4 +29,9 @@ fun foo() {
|
|||||||
"someString".bar("foo")
|
"someString".bar("foo")
|
||||||
fun String.baz(p1: String): String { return "Baz" }
|
fun String.baz(p1: String): String { return "Baz" }
|
||||||
"someString".baz("bazParam")
|
"someString".baz("bazParam")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.NotNull
|
||||||
|
|||||||
@@ -8,4 +8,7 @@ class B<T> {
|
|||||||
val b0 = B<String>()
|
val b0 = B<String>()
|
||||||
val b1 = B<Any>()
|
val b1 = B<Any>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
|||||||
@@ -61,3 +61,5 @@ class Class1<T1> {
|
|||||||
Local<Int>().fn2(t, "")
|
Local<Int>().fn2(t, "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Found more type arguments than parameters: foo.bar.Class1 ...while extracting a enclosing class (fn1) at %generics.kt:57:5:62:5%
|
||||||
|
|||||||
@@ -3,3 +3,6 @@ public class Test() {
|
|||||||
internal constructor(x: Int, y: Int) : this() { }
|
internal constructor(x: Int, y: Int) : this() { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
|||||||
@@ -10,3 +10,6 @@ public class Test {
|
|||||||
internal fun internalFun() = 3
|
internal fun internalFun() = 3
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
|||||||
@@ -1 +1,8 @@
|
|||||||
fun f(n: Number, b: Byte) = n.toByte() + n.toShort() + n.toInt() + n.toLong() + n.toFloat() + n.toDouble() + b.toByte() + b.toShort() + b.toInt() + b.toLong() + b.toFloat() + b.toDouble()
|
fun f(n: Number, b: Byte) = n.toByte() + n.toShort() + n.toInt() + n.toLong() + n.toFloat() + n.toDouble() + b.toByte() + b.toShort() + b.toInt() + b.toLong() + b.toFloat() + b.toDouble()
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toByte in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:112:1:119%
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toDouble in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:178:1:187%
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toFloat in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:164:1:172%
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:139:1:145%
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toLong in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:151:1:158%
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Byte.toShort in java.lang.Byte ...while extracting a call (<no name>) at %test.kt:1:125:1:133%
|
||||||
|
|||||||
@@ -28,3 +28,5 @@ fun special(n: Number, m: Map<String, String>, s: String, l: MutableList<Int>) {
|
|||||||
m.entries.first().key
|
m.entries.first().key
|
||||||
m.entries.first().value
|
m.entries.first().value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Couldn't find a Java equivalent function to kotlin.Number.toChar in java.lang.Number %
|
||||||
|
|||||||
@@ -13,3 +13,10 @@ class Dkotlin : Base() {
|
|||||||
override fun fn0(x: Int): String = super.fn0(x)
|
override fun fn0(x: Int): String = super.fn0(x)
|
||||||
override suspend fun fn1(x: Int): String = super.fn1(x)
|
override suspend fun fn1(x: Int): String = super.fn1(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.Nullable
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.Nullable
|
||||||
|
|||||||
@@ -2,3 +2,6 @@ public class Kotlin {
|
|||||||
internal fun kotlinFun() {
|
internal fun kotlinFun() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
|||||||
@@ -85,3 +85,14 @@ public class TestDefaultParameterReference {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Completion failure for type: kotlin.jvm.JvmOverloads
|
||||||
|
// Diagnostic Matches: Completion failure for type: kotlin.jvm.JvmStatic
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.Nullable
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.jvm.JvmOverloads
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.jvm.JvmStatic
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.Nullable
|
||||||
|
|||||||
@@ -4,3 +4,10 @@ public class A {
|
|||||||
fun <T> genericFunctionWithOverloads(x: T? = null, y: List<T>? = null, z: T? = null): T? = z
|
fun <T> genericFunctionWithOverloads(x: T? = null, y: List<T>? = null, z: T? = null): T? = z
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Completion failure for type: kotlin.jvm.JvmOverloads
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.Nullable
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.jvm.JvmOverloads
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.Nullable
|
||||||
|
|||||||
@@ -65,3 +65,10 @@ fun externalUser() {
|
|||||||
NonCompanion.propWithStaticSetter = NonCompanion.propWithStaticGetter
|
NonCompanion.propWithStaticSetter = NonCompanion.propWithStaticGetter
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete annotation: @kotlin.Metadata(%)
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.Metadata
|
||||||
|
// Diagnostic Matches: Completion failure for type: kotlin.jvm.JvmStatic
|
||||||
|
// Diagnostic Matches: Completion failure for type: org.jetbrains.annotations.NotNull
|
||||||
|
// Diagnostic Matches: Unknown location for kotlin.jvm.JvmStatic
|
||||||
|
// Diagnostic Matches: Unknown location for org.jetbrains.annotations.NotNull
|
||||||
|
|||||||
@@ -31,3 +31,16 @@ public class Int {
|
|||||||
public object Unit {
|
public object Unit {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Boolean
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Byte
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Character
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Double
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Float
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Integer
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Long
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Short
|
||||||
|
// Diagnostic Matches: % Can't find java.lang.Void
|
||||||
|
// Diagnostic Matches: % Can't find kotlin.UByte
|
||||||
|
// Diagnostic Matches: % Can't find kotlin.UInt
|
||||||
|
// Diagnostic Matches: % Can't find kotlin.ULong
|
||||||
|
// Diagnostic Matches: % Can't find kotlin.UShort
|
||||||
|
|||||||
@@ -11,4 +11,3 @@ class Class1 {
|
|||||||
kotlin.jvm.internal.collectionToArray(listOf(1))
|
kotlin.jvm.internal.collectionToArray(listOf(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting '//A03BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:19:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting '//A03BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression (<no name>) at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression (<no name>) at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression (<no name>) at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048577 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048577 | DATE TIME Truncated string of length 1048577\nTruncated string of length 1048577, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDE' ...while extracting a expression (<no name>) at long_string.kt:16:31:16:1048607\n ...while extracting a variable expr (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a variable (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a statement (longStringLiteral3) at long_string.kt:16:5:16:1048608\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A04BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:19:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A04BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A05"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:19:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting '//A05"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a file (long_comments.kt) at long_comments.kt:1:1:22:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression (<no name>) at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression (<no name>) at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression (<no name>) at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'A"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""', ending '""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""CDEF' ...while extracting a expression (<no name>) at long_string.kt:18:31:18:2097181\n ...while extracting a variable expr (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a variable (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a statement (longStringLiteral5) at long_string.kt:18:5:18:2097182\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
||||||
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a expression (<no name>) at long_string.kt:17:31:17:1048608\n ...while extracting a variable expr (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a variable (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a statement (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
| file://:0:0:0:0 | Truncated string of length 1048578 | CodeQL Kotlin extractor | 2 | | Truncated string of length 1048578 | DATE TIME Truncated string of length 1048578\nTruncated string of length 1048578, starting 'ABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB', ending 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCDEF' ...while extracting a expression (<no name>) at long_string.kt:17:31:17:1048608\n ...while extracting a variable expr (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a variable (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a statement (longStringLiteral4) at long_string.kt:17:5:17:1048609\n ...while extracting a block body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a body (<no name>) at long_string.kt:13:22:19:1\n ...while extracting a function (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a declaration (longLiteralFun) at long_string.kt:13:1:19:1\n ...while extracting a file (long_string.kt) at long_string.kt:1:1:21:0\n |
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -28,3 +28,5 @@ public class A {
|
|||||||
b.elem = new Object();
|
b.elem = new Object();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete inheritance relation for type java.lang.Object and supertype none
|
||||||
|
|||||||
@@ -119,4 +119,6 @@ public class Test<V> {
|
|||||||
* @param <X> does not exist
|
* @param <X> does not exist
|
||||||
*/
|
*/
|
||||||
interface GenericInterface<T> {}
|
interface GenericInterface<T> {}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete inheritance relation for type java.lang.Object and supertype none
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,6 @@ public class Test {
|
|||||||
Object test2() {
|
Object test2() {
|
||||||
return null; // returnstatement.ql
|
return null; // returnstatement.ql
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Diagnostic Matches: Incomplete inheritance relation for type java.lang.Object and supertype none
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user