mattinger
09/21/2022, 1:27 PMSOME_VALUE_WE_DONT_CARE_ABOUT -> { }
The issue is that sonarqube is treating this as a code smell, and our quality gate is blocking merges when this happens. So we have to either change our quality gate, or use admin privs to merge. Does anyone know if there’s a way to tell sonar to ignore these?Klitos Kyriacou
09/21/2022, 1:38 PMelse -> {}
?kenkyee
09/21/2022, 2:18 PMmattinger
09/21/2022, 2:28 PMMichael de Kaste
09/21/2022, 2:35 PMenum class Count{ ONE, TWO, THREE, FOUR, FIVE }
and we only do something on even values:
when(count){
TWO, FOUR -> doThing()
ONE, THREE, FIVE -> { }
}
when we add SIX
as a value, we get compile errorsMichael de Kaste
09/21/2022, 2:36 PMphldavies
09/22/2022, 11:45 AMSOME_VALUE_WE_DONT_CARE_ABOUT -> Unit
and possibly Sonar would be happy with that?