ljw1004 / platform-specific-analyzer

Finds platform- and version-specific code in your UWP apps
MIT License
14 stars 2 forks source link

Incorrectly marking a method as being version specific when an overload is version-specific #1

Closed ljw1004 closed 8 years ago

ljw1004 commented 8 years ago

[copied from https://github.com/ljw1004/blog/issues/3 @sohra]

My example is RfcommServiceProvider.StartAdvertising(StreamSocketListener) listed on MSDN as being in the UniversalApiContract at version 1. My code was calling this and being flagged as version specific.

An overload was added in version 2 RfcommServiceProvider.StartAdvertising(StreamSocketListener, bool) and I'm guessing this is what was causing my code to be flagged.

The analyzer should consider the parameters to distinguish which overload is being called and if, in fact, it is actually version-specific or not.

ljw1004 commented 8 years ago

Thanks for reporting this @sohra. I've made the change and will push a new version out to NuGet later today.