[Analyzer] Lift arrays of literals to static fields #78398
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Runtime
code-analyzer
Marks an issue that suggests a Roslyn analyzer
code-fixer
Marks an issue that suggests a Roslyn code fixer
Milestone
We should consider adding an info-level analyzer that flags cases where arrays of literals are being allocated and recommend they instead be lifted to be stored in static readonly fields. We'll need to experiment a bit to drive down false positive rates, e.g.
ReadOnlySpan<T>
.Related:
#33793
The text was updated successfully, but these errors were encountered: