saveourtool/diktat

Shadowing of variables detection

オープン

#425 opened on 2020/10/19

 (1 件のコメント) (0 件のリアクション) (1 人の担当者)Kotlin (40 件のフォーク)github user discovery
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (571 個のスター)
PR merge metrics
 (30d に merged 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++
        }
}

コントリビューターガイド