mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Kotlin: exclude generated code from useless parameter check
This commit is contained in:
@@ -304,6 +304,9 @@ 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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
| Test.kt:11:1:11:22 | p2 | The parameter 'p2' is never used. |
|
||||
| Test.kt:11:8:11:18 | a | The parameter 'a' is never used. |
|
||||
|
||||
Reference in New Issue
Block a user