SA4015: more wrong float math
Seen this original code in the wild: int(math.Ceil(float64(gap / 2))) (for var gap int) – staticcheck pointed out that the call to math.Ceil was pointless, so the code got changed to int(float64(gap / 2)), but the code very likely was supposed to read int(math.Ceil(float64(gap) / 2)).
@dominikh math.Ceil(1.2) is 2, while int(1.2) is 1, so ceiling is not pointless if the intention is to ceil. Results are completely different. Almost followed the suggestion but realised it will introduce a bug for my case. So I'd consider this issue as bug.
It is pointless when you're ceiling the result of converting an integer to a floating point number. int(math.Ceil(float64(x))) where x is int is identical to x.