dotnet / platform-compat

Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.
MIT License
279 stars 43 forks source link

Flag TaskCompletionSource ctor error? #117

Open danmoseley opened 6 years ago

danmoseley commented 6 years ago

TaskCompletionSource doesn't have a ctor that takes a TaskContinuationOptions... it has a ctor that takes a TaskCreationOptions, and one that takes object. So it is easy to accidentally pass TaskContinuationOptions without knowing. Perhaps we could flag that.

https://github.com/dotnet/corefx/issues/29664

BrennanConroy commented 5 years ago

I have now seen this 3 or 4 times in PR's/product code. What would it take to get some movement on warning about this?

danmoseley commented 5 years ago

We are planning to invest more in this tool, but don't have specifics yet.

We're also likely to add an analyzer for it to the Visual Studio analyzers set: https://github.com/dotnet/corefx/issues/40739

BrennanConroy commented 5 years ago

Ah perfect, thanks, I'll follow that thread.

madenwala commented 5 years ago

I'm working on a PR for this. Will submit soon.