The Arduino IDE has an auto format feature (ctrl-t).
Embrace and love it, but it won't work if the code is badly formed.