saveourtool/diktat

Rule: Create variable for long conditions and use them instead

Open

#829 opened on 2021年4月9日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Kotlin (40 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (571 stars)
PR merge metrics
 (PR metrics pending)

説明

In case of some long condition

if (cond1 && cond2 && cond3 && .....) {
}

It's better to create an additional variable for more readability

val condition = cond1 && cond2 && cond3 && .....
if (condition) {
}

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