Closed RedX2501 closed 3 years ago
Thanks for reporting, I understand this is quite annoying.
Unfortunately, the code formatter API in Visual Studio is very limited. There are no settings for whitespace handling around attributes, so I implemented that myself for the default case (which means all parameters on the same line). See here for details. It is nearly impossible to get this right for the various styles used by developers, without relying on a formatter that 'understands' your style.
For formatting my own code, I'm using Resharper instead, which has overwhelming support for details like this. It can infer basic style settings from your codebase. Once configured properly, it only takes a single command to reformat all your code. Although Resharper is not free, their command-line runners are.
Version Used: 2.0.2
Steps to Reproduce:
Have a function with the following signature:
Expected Behavior:
After applying the CNUL rule:
Actual Behavior:
Notice the space left behind in front of the
bool
: