saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
521 stars 39 forks source link

False positive `MISSING_KDOC_ON_FUNCTION` on local function (function inside another function) #1773

Closed DrAlexD closed 9 months ago

DrAlexD commented 10 months ago

Warning MISSING_KDOC_ON_FUNCTION is thrown for functions printHello() and printBye():

    fun printHelloAndBye() {
        fun printHello() {
            print("Hello")
        }
        printHello()
        val ab = 5
        ab?.let {
            fun printBye() {
                print("Bye")
            }
            printBye()
        }
    }
nulls commented 10 months ago

Please provide the code example

DrAlexD commented 10 months ago

Code example added