RadarCOVID / radar-covid-android

Native Android app using DP^3T Android sdk to handle Exposure Notifications API from Google
Mozilla Public License 2.0
382 stars 84 forks source link

Curly braces should be used on conditionals #8

Closed josealfonsomora closed 3 years ago

josealfonsomora commented 3 years ago

🔑 From Kotlin code convention: https://kotlinlang.org/docs/reference/control-flow.html

var max = a 
if (a < b) max = b

// With else 
var max: Int
if (a > b) {
    max = a
} else {
    max = b
}

// As expression 
val max = if (a > b) a else b

There are a few places where the curly braces are omitted

seth0027 commented 3 years ago

can I resolve this issue?

avecina commented 3 years ago

This is a coding style decision and this contribution is not affecting the code readability in an objective way. Thanks for your suggestion.