CA2000 does not report on JsonDocument instances returned from JsonDocument.Parse
Open
Area-Microsoft.CodeAnalysis.NetAnalyzers
untriaged
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
[Re-created from the [original issue](https://github.com/dotnet/roslyn-analyzers/issues/6861) reported by @stephentoub in the old repo]
JsonDocument is disposable, but CA2000 is not reported for `JsonDocument.Parse` calls like this:
JsonElement json = JsonDocument.Parse(...).RootElement;
CA2000 should warn that the JsonDocument instance returned from Parse needs to be disposed.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.