saveourtool/diktat

Shadowing of variables detection

开放

#425 创建于 2020年10月19日

 (1 条评论) (0 个反应) (1 位负责人)Kotlin (40 个派生)github user discovery
enhancementgood first issuehelp wanted

仓库指标

星标
 (571 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Diktat should be able to detect shadowed variables as it can cause serious issues.

Name shadowing can cause following issues. There should be no shadowing.
infinite loop:

fun main() {
        var x = 0
        while (x < 10) {
            var x = 0
            x++
        }
}

贡献者指南