mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Merge pull request #11300 from tamasvajk/kotlin-useless-param-2
Kotlin: Exclude .kt files from useless parameter query
This commit is contained in:
@@ -274,7 +274,7 @@ class DeadMethod extends Callable {
|
||||
|
||||
class RootdefCallable extends Callable {
|
||||
RootdefCallable() {
|
||||
this.fromSource() and
|
||||
this.getFile().isJavaSourceFile() and
|
||||
not this.(Method).overridesOrInstantiates(_)
|
||||
}
|
||||
|
||||
|
||||
@@ -19,3 +19,6 @@ object O {}
|
||||
fun C.fn() {}
|
||||
fun C.Companion.fn() {}
|
||||
fun O.fn() {}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun fn2(a: Int) {}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
| Test.kt:11:8:11:18 | a | The parameter 'a' is never used. |
|
||||
| Test.kt:19:5:19:5 | <this> | The parameter '<this>' is never used. |
|
||||
|
||||
Reference in New Issue
Block a user