Merge pull request #11300 from tamasvajk/kotlin-useless-param-2

Kotlin: Exclude .kt files from useless parameter query
This commit is contained in:
Tamás Vajk
2022-11-16 16:22:27 +01:00
committed by GitHub
3 changed files with 4 additions and 3 deletions

View File

@@ -274,7 +274,7 @@ class DeadMethod extends Callable {
class RootdefCallable extends Callable {
RootdefCallable() {
this.fromSource() and
this.getFile().isJavaSourceFile() and
not this.(Method).overridesOrInstantiates(_)
}

View File

@@ -19,3 +19,6 @@ object O {}
fun C.fn() {}
fun C.Companion.fn() {}
fun O.fn() {}
@Suppress("UNUSED_PARAMETER")
fun fn2(a: Int) {}

View File

@@ -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. |