[wix-devs] C++ code style annoyance

Bob Arnson bob at firegiant.com
Mon Sep 12 19:36:01 PDT 2022


https://wixtoolset.org/development/code-style/ says that function definitions with multiple parameters has each parameter on its own line with the closing paren indented once, like each parameter. So far, we haven't been able to get .editorconfig support to match that style; currently, it outdents the closing paren, which matches the opening brace of the function body.

extern "C" HRESULT __stdcall FunctionName(
    __in LPCWSTR wzFoo,
    __out BOOL *pfBar
    );

-v-


extern "C" HRESULT __stdcall FunctionName(

    __in LPCWSTR wzFoo,

    __out BOOL *pfBar

);


Formatting the file inside VS results in all the closing parens getting reformatted. Not being able to "clean up" before committing makes me sad. (It also means that new code gets the "wrong" formatting and you have to remember to manually clean it up, which is bad. But my sadness is top priority, of course.)

Should we change the style?


More information about the wix-devs mailing list