We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description of the false positive
In general, the cs/equals-on-unrelated-types rule makes sense: https://lgtm.com/rules/1506096656531/
cs/equals-on-unrelated-types
However, there are certain types, such as Uri which handle specific sets of types for equality in the Equals override method. In this particular case, Uri.Equals allows for the object to be string and tries to create a Uri from that string before comparing. https://github.com/dotnet/runtime/blob/94ca567c76d4b2a8a5b2e744e3d9559abbcefdb0/src/libraries/System.Private.Uri/src/System/Uri.cs#L1629-L1657
Uri
Equals
Uri.Equals
string
URL to the alert on the project page on LGTM.com
https://lgtm.com/projects/g/dotnet/corefx/snapshot/4fed824926d1c659c494bd5261fbae0236b2e9da/files/src/System.Private.Uri/src/System/UriBuilder.cs?sort=name&dir=ASC&mode=heatmap#V364
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description of the false positive
In general, the
cs/equals-on-unrelated-types
rule makes sense: https://lgtm.com/rules/1506096656531/However, there are certain types, such as
Uri
which handle specific sets of types for equality in theEquals
override method. In this particular case,Uri.Equals
allows for the object to bestring
and tries to create aUri
from that string before comparing.https://github.com/dotnet/runtime/blob/94ca567c76d4b2a8a5b2e744e3d9559abbcefdb0/src/libraries/System.Private.Uri/src/System/Uri.cs#L1629-L1657
URL to the alert on the project page on LGTM.com
https://lgtm.com/projects/g/dotnet/corefx/snapshot/4fed824926d1c659c494bd5261fbae0236b2e9da/files/src/System.Private.Uri/src/System/UriBuilder.cs?sort=name&dir=ASC&mode=heatmap#V364
The text was updated successfully, but these errors were encountered: