csharpier icon indicating copy to clipboard operation
csharpier copied to clipboard

Code churn with #if directives

Open belav opened this issue 2 years ago • 0 comments

With how #if directives are formatted CSharpier will end up producing a different result depending on the condition.

In other words, these two end up with different results.

CallMethod(
    long______________________________________________
#if DEBUG
    , long______________________________________________
#endif
);

// vs

CallMethod(long______________________________________________
#if !DEBUG
    , long______________________________________________
#endif
);

This may be need to be handled in a non-generic way. IE in this case the argument list needs to determine if it contains any directives and if so break.

belav avatar Feb 18 '23 16:02 belav