IDISP0013 should not warn when not using the disposable
See original GitHub issuenamespace RoslynSandbox
{
using System.IO;
using System.Threading.Tasks;
public class Foo
{
public static Task FooAsync()
{
using (var stream = File.OpenRead(string.Empty))
{
return Task.Delay(0);
}
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Easily Tell if Your Disposable Vape Is Almost Empty
That's rare with one-use disposables, but if your disposable is rechargeable, make sure you stop using it when the vapor starts to diminish...
Read more >Are Disposable Vapes Safe?
The aerosol produced by disposable vapes that contain more nicotine than the legal limit (or other chemicals) can be harmful when inhaled over ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We frequently use the
using
block for its try/finally ability where the using expression doesn’t directly get used by the code within the block.Not sure how to write this rule as it can be:
Where we probably want to await.