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
544 stars 39 forks source link

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

Closed DrAlexD closed 11 months ago

DrAlexD commented 1 year 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 1 year ago

Please provide the code example

DrAlexD commented 1 year ago

Code example added