Add PreferTypedStringBuilderAppendOverloads analyzer + fixer#3443
Add PreferTypedStringBuilderAppendOverloads analyzer + fixer#3443stephentoub merged 1 commit intodotnet:masterfrom stephentoub:stringbuilderoverloads
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3443 +/- ##
========================================
Coverage 95.27% 95.28%
========================================
Files 1006 1009 +3
Lines 230946 231260 +314
Branches 14921 14939 +18
========================================
+ Hits 220041 220346 +305
- Misses 9259 9263 +4
- Partials 1646 1651 +5 |
|
FYI: You will need to fix a new RS diagnostic once #3444 goes in - should be easy to fix with an IDE code fix. |
Done. |
src/Microsoft.CodeAnalysis.Analyzers/Microsoft.CodeAnalysis.Analyzers.md
Outdated
Show resolved
Hide resolved
...rs/Core/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloads.Fixer.cs
Outdated
Show resolved
Hide resolved
...rs/Core/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloads.Fixer.cs
Outdated
Show resolved
Hide resolved
...nitTests/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloadsTests.cs
Outdated
Show resolved
Hide resolved
...nitTests/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloadsTests.cs
Outdated
Show resolved
Hide resolved
...nitTests/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloadsTests.cs
Outdated
Show resolved
Hide resolved
...nitTests/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloadsTests.cs
Outdated
Show resolved
Hide resolved
...nalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/PreferTypedStringBuilderAppendOverloads.cs
Outdated
Show resolved
Hide resolved
|
I have a question about this PR, @stephentoub: The original issue was categorized by Immo as "Performance", but this PR adds the analyzer inside the Runtime folder instead of the Performance folder. Why is that?
I have this issue assigned to me to create an analyzer, and was also categorized as "Performance", so I'd like to know how to decide in which folder should I create my analyzer. |
| [InlineData("object", false)] | ||
| [InlineData("char[]", false)] | ||
| [InlineData("DateTime", false)] | ||
| [InlineData("DayOfWeek", false)] |
There was a problem hiding this comment.
Is this to cover the generalized enum scenario?
The categorization that's important is this one: |
|
Agree with @stephentoub - the important bit is the category set in the descriptor. Ideally, the folder structure will match the rule category, but it has been out of sync for a while. We have wanted to correct it, but never got to prioritize that work. We can even consider flattening the files into a single folder, i.e. put all analyzers under the folder https://github.com/dotnet/roslyn-analyzers/tree/master/src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers and remove all sub-folders. |
Fixes dotnet/runtime#33787
cc: @bartonjs, @jeffhandley, @mavasani, @sharwell