saveourtool/diktat
Vedi su GitHubRule: Create variable for long conditions and use them instead
Open
#829 aperta il 9 apr 2021
enhancementgood first issue
Metriche repository
- Star
- (571 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
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) {
}