mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Merge pull request #10789 from tamasvajk/kotlin-useless-params
Kotlin: reduce FPs in useless parameter check for Kotlin code
This commit is contained in:
@@ -304,6 +304,15 @@ class RootdefCallable extends Callable {
|
||||
this.getAnAnnotation() instanceof OverrideAnnotation
|
||||
or
|
||||
this.hasModifier("override")
|
||||
or
|
||||
// Exclude generated callables, such as `...$default` ones extracted from Kotlin code.
|
||||
this.isCompilerGenerated()
|
||||
or
|
||||
// Exclude Kotlin serialization constructors.
|
||||
this.(Constructor)
|
||||
.getParameterType(this.getNumberOfParameters() - 1)
|
||||
.(RefType)
|
||||
.hasQualifiedName("kotlinx.serialization.internal", "SerializationConstructorMarker")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user