I’ve created a config file for the AStyle (it’s very cool tool for file formatting and indentation).
It includes almost all JUCE’s coding standards’ formatting rules.
I think it could be convenient especially for the newcomers to JUCE.
It’s very easy to use:
astyle --options="juce_astyle.options" [path to the file]
If we want to perform recursive formatting we should use “-r” flag and wildcard:
astyle --options="juce_astyle.options" "*.cpp" -r
To perform a trial run with no changes to the files, add “–dry-run” flag.
astyle --options="juce_astyle.options" "*.cpp" -r --dry-run
The file with this config is available at https://github.com/sept-en/JUCE-utilities/blob/master/juce_astyle.options .