saveourtool/diktat
在 GitHub 查看Rule: Create variable for long conditions and use them instead
Open
#829 创建于 2021年4月9日
enhancementgood first issue
仓库指标
- Star
- (571 star)
- PR 合并指标
- (PR 指标待抓取)
描述
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) {
}