Coding Standard


There doesn’t seem to be a direct link in the Tutorials or Documentation or anything for the coding standards page. the only way I’ve been able to get to it is via google. you might want to add it somewhere to the main website for easier access.


You find it under: “Discover” -> “Stories” -> “Load more…” -> Coding Standard

I agree, it could be a bit more prominent…


I’d second (third?) that!


May I jump in here and ask, how JUCE is internally handling that coding standard? Do you have a code-style script running prior to any commit?

I really love that coding standard, and have adapted it over time, however, my older code is a mixture of different standards, so just a mess :wink:

I started working on some basic regexp search&replace patterns to tidy things up… However, that’s also kind of annoying. How do you guys handle it? clang-format? If yes, have you thought about providing the settings? Would be a very nice addition to the coding standard itself.


Exceptions to the rules occur just about often enough that using any automated tool is annoying; they sort out the bulk of the formatting but consistently cause problems in specific places.

We’re fortunate that everyone on the JUCE team is competent and diligent so we can just clean up what little slips though in code reviews. It also helps that the source code is the product, so tasks like getting the formatting right are relatively high priority.