Hello DevExpress-Supportteam,
I have a problem I would need your help with. It revolves around the Option C# -> Formatting -> Spacing -> Type Arguments -> Insert space after a seperator (comma). No matter if I activate or deactivate it, in a certain case I always get a warning. I made a small example to visualize the problem:
C#// Before cleanup: no warnings
var type1 = typeof(IComparer<,>);
var type2 = typeof(IComparer<string, string>);
// After cleanup with Insert space after a seperator (comma) activated
var type3 = typeof(IComparer<, >); // Warning SA1015: Closing generic brackets should not be preceded by a space
var type4 = typeof(IComparer<string, string>);
// After cleanup with Insert space after a seperator (comma) activated
var type5 = typeof(IComparer<,>);
var type6 = typeof(IComparer<string,string>); // Warning SA1001: Commas should be followed by whitespace
Could you please advise how i can solve this problem?
Thanks a lot, and have a nice day,
Michael
Thank you for the report, Michael.
I reproduced this problem. We discussed this ticket with the team and decided that we need to fix this issue in our formatting engine.
Please bear with us, we will let you know once we make a fix.
Hi Michael,
We added the "Insert space after a separator (comma) when type arguments are omitted" option to separate rules of formatting in your case. This option is disabled by default. So, if you enable the "Insert space after a separator (comma)" option, then CodeRush formatting should work correctly. We prepared a build with a new option:
DevExpress.CodeRush-21.2.5.21362.exe
DevExpress.CodeRush-21.2.5.21362.vsix
DevExpress.CodeRush.Dev17-21.2.5.21362.vsix
Please install it and let me know whether it solves the issue.
Hello Alexander,
I can confirm that this fixed it.
Thanks a lot, and have a nice day,
Michael
You are welcome, Michael. Have a nice day too.