You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #4352, we should also warn when Assert.AreNotSame is called with at least one argument being a value type.
Such assert will never fail and is likely not the intent.
Background and Motivation
Searching quickly with grep.app, I found a violation example here:
Summary
Similar to #4352, we should also warn when Assert.AreNotSame is called with at least one argument being a value type.
Such assert will never fail and is likely not the intent.
Background and Motivation
Searching quickly with grep.app, I found a violation example here:
https://github.com/jmpoep/vmprotect-3.5.1/blob/d8fcb7c0ffd4fb45a8cfbd770c8b117d7dbe52b5/runtime/VMProtect.Runtime/Tests/UnitTestProject/UnitTest1.cs#L34
The linked assert will not fail even if
hwid.ToString().Length
is zero, which is clearly not the intent of the assertion.Proposed Feature
An analyzer to warn when Assert.AreNotSame is called with value types.
Alternative Designs
The text was updated successfully, but these errors were encountered: