sonar-dotnet
sonar-dotnet copied to clipboard
Update S2365: Rule should report on new collection
Description
The S2365 rule should be improved to start raising on cases where the property returns a new collection from one of the field collection.
public List<string> People => new List<string>(_people);
as we currently report on
public List<string> People => _people.ToList();
https://rules.sonarsource.com/csharp/RSPEC-2365
@Evangelink Please add same rule for ToDictionary/ToArray/ToLookup/ToHashSet etc
This issue will be tracked in NET-1261 (not publicly accessible)