There are a huge number of benefits to automatic formatting of code, including the very obvious one of guaranteed consistency and therefore readability.Iit also saves brain cycles and can prevent team bike-shedding.

@CrushedPixel, who prompted me to write this FAQ entry says

Formatting is a really key component and you’re providing it out of the box. I have learned to swallow my pride when it comes to my own preferences, so I’m okay as long as I can just hit save and the IDE does the deed for me

The included .clang-format file will get you very close to the JUCE style guide.

On CLion, see this guide on how to clang format on save or on key command (my preference).

On VS 2022, it’s enabled by default.

On Xcode, see this plugin (disclaimer, when I was still using Xcode I couldn’t find a great solution, which is part of why I switched to CLion).


Leave a Reply

Your email address will not be published. Required fields are marked *