Fix S2259 FP/FN: Do not raise on Nullable members #6840
Labels
Area: C#
C# rules related issues.
Area: VB.NET
VB.NET rules related issues.
Sprint: SE
Short-lived* label for epic MMF-3077 *troll
Type: CFG/SE FPs
Rule IS triggered when it shouldn't be for CFG and SE rules.
Projects
Milestone
In the context of S2259 and S3655, we need to split their responsibility for handling nullable types.
S2259 should not raise on
nullable.HasValue
nullable.Value
nullable.GetValueOrDefault()
nullable.Equals(..)
nullable.ToString()
nullable.GetHashCode()
as those are safe to call when
nullable
hasObjectConstraint.NullValue
, or handled by S3655.It should still raise on
nullable.GetType()
The text was updated successfully, but these errors were encountered: