How to disable the alignment of arguments in functions with CodeMaid in Visual Studio?

944 views Asked by At

For example when I want to save something like this:

    SummaryInfo(int succeededFiles,
                int skippedFiles,
                int failedFiles,
                int alreadyProcessedFiles,
                int succeededFolders
    );

But CodeMaid changes it to:

    SummaryInfo(int succeededFiles,
        int skippedFiles,
        int failedFiles,
        int alreadyProcessedFiles,
        int succeededFolders
    );

CodeMaid has a lot of options but I could not find the right one.

References:

1

There are 1 answers

0
Steve Cadwallader On

Indentation is natively handled by Visual Studio's Format Document call which CodeMaid invokes as a part of its own cleanup. A good way to confirm this is native Visual Studio behavior is to invoke Visual Studio's command directly (Edit->Advanced->Format Document).

There may be an option in Visual Studio to configure the indentation behavior. A place worth looking is Tools->Options->Text Editor->C#->Code Style->Formatting->Indentation.

If there isn't an option available in Visual Studio to change the behavior, you can stop CodeMaid from invoking that command altogether at CodeMaid->Options->Cleaning->Visual Studio->"Run format document". It will cause you to lose several other helpful cleanups though.

Hope it helps!