Open Goooler opened 5 days ago
There is only so much we could do without type resolution support. It could be done in that specific example, as they are in the same file, but that's not going to be common in most inheritance situations, so I'm hesitant as to whether it's worth doing it at all.
BaseFoo.kt
:
abstract class BaseFoo {
@Suppress("ktlint:standard:function-naming")
abstract fun _bar()
}
Foo1.kt
:
class Foo1 : BaseFoo() {
override fun _bar() {
println("Foo1")
}
}
The above case works in Ktlint 1.3.1, it should be helpful for fixing this issue. And it also works in Detekt 1.23.6 after replacing the suppress rule to FunctionNaming
or FunctionName
.
Describe the bug
Code sample:
run ktlint check:
Expected behavior
No warning thrown like in AS