Open DmitryMak opened 8 months ago
Moving to dotnet\runtime for triaging the requested change in rule category.
Tagging subscribers to this area: @dotnet/area-system-runtime See info in area-owners.md if you want to be subscribed.
Author: | DmitryMak |
---|---|
Assignees: | - |
Labels: | `area-System.Runtime`, `untriaged`, `needs-area-label` |
Milestone: | - |
CA1819 being under the performance category is quite misleading. And it's not clear at all why a Collection<T>
is more preferable than a T[]
if we do intend to expose a mutable collection. Quite frankly the rule in its current state is more harmful than it's helpful.
Analyzer
Diagnostic ID: CA1819
Describe the improvement
This is based on a discussion here: https://github.com/dotnet/docs/issues/28424#issuecomment-1877767195
Describe suggestions on how to achieve the rule
CA1819 should not be in the Performance category. Maybe a new performance rule can be created that will detect cloning?