The JUCE coding standards famously say that you should have a whitespace before non-empty parentheses, but no whitespace before empty parentheses:
However, when typing code like above, I can’t figure out how to teach Visual Studio 2019 to not auto-format my whitespace all the time!
What’s the combination of tickboxes that I have to use so that VS lets me type code like above?
Wait, I finally figured it out. For everyone else’s benefit, this is the relevant setting:
Good to know! Now does anybody have a lead on how to go about retrospectively fixing the spacing in a million and one places throughout a project? Any
grep masters out there?
This can be done using
TL;DR: Use the
SpaceBeforeParens: NonEmptyParentheses setting in clang-format which was generously added by @reuk