0

I want to write a custom lint rule to detect 'override' functions in Kotlin.

override fun testFunction(test: String) {
// function body
}

I would like to detect whether any function I am traversing via UAST is an override function.

override fun createUastHandler(context: JavaContext): UElementHandler {
        return object : UElementHandler() {
            override fun visitMethod(node: UMethod) {
                // function to detect whether node is an override function

            }
        }
    }

I tried almost all properties present in UMethod but could not get any success.

pseudobot
  • 13
  • 3

0 Answers0