Disable SA1122 (Use string.Empty for empty strings)#7239
Conversation
|
Error: The issue is in microsoft.codeanalysis.collections. I am unsure how to fix it, other than fixing it upstream. |
|
@sharwell, apparently Based on my reading, the advantage is in readability and to reduce the chance of a hidden zero width space character. There was acutally one disadvantage that I saw: It also isn't a constant: Which results in some usages being incorrect: runtime also turned down adding a constant and suggested using |
|
@Forgind You may want to review this with the team? We can set the analyzer to none if it isn't helpful. |
|
@rainersigwald Should we just disable this rule? |
|
IMO this rule is more tedious than it's worth. |
|
If the team gives the okay, I will mark the severity for this analyzer as none. |
|
In dotnet/runtime we prefer "" . I think string.Empty is a useless vestige. |
Relates to #7174
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1122.md