Description
It appears as if redundantNewKeyword works only occasionally. I rarely see it warning with FL0014.
Repro steps
The following code doesn't raise FL0014:
new System.Collections.Generic.Dictionary<string, string>() |> ignore
new Guid() |> ignore
Yet the following does:
Expected behavior
Unless IDisposable is implemented, it should raise FL0014. This doesn't happen.
Actual behavior
For most real-world code, it doesn't raise "Usage of 'new' keyword here is redundant".
Known workarounds
None
Related information
- Operating system: Win10/Win11
- Branch: most recent as of today with
dotnet install
- .NET Runtime, CoreCLR or Mono Version: .NET 6.0