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
When writing assertions with Debug.Assert, it is expected that the result is always true. Even if the true value is "dead conditional code", ie. if the assertion results are known to be true. Debug.Assert is still useful to protect the assumptions in case of a refactoring.
Describe suggestions on how to achieve the rule
The return value of Debug.Assert does not get flagged by CA1508.
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA1508
Describe the improvement
When writing assertions with
Debug.Assert
, it is expected that the result is always true. Even if the true value is "dead conditional code", ie. if the assertion results are known to be true.Debug.Assert
is still useful to protect the assumptions in case of a refactoring.Describe suggestions on how to achieve the rule
The return value of
Debug.Assert
does not get flagged byCA1508
.The text was updated successfully, but these errors were encountered: