-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Enable IDE0059 #39434
New issue
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
Enable IDE0059 #39434
Conversation
Contributes to dotnet#24055
if (traitAttribute is ReflectionAttributeInfo attribute && attribute.Attribute is QuarantinedTestAttribute quarantinedTestAttribute) | ||
if (traitAttribute is ReflectionAttributeInfo { Attribute: QuarantinedTestAttribute }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++pranavPoints
var codeUnitCount = 1; | ||
var expectValueMin = 0; | ||
int currentDecodeBits; | ||
int codeUnitCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be:
int codeUnitCount = 1;
?
var byteCount = 1; | ||
var expectValueMin = 0; | ||
int currentDecodeBits; | ||
int byteCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byteCount = 1?
src/Middleware/Spa/SpaServices.Extensions/src/Util/EventedStreamReader.cs
Show resolved
Hide resolved
Contract.Ensures((Contract.ValueAtReturn(out length) >= 0) && | ||
(Contract.ValueAtReturn(out length) <= (input.Length - startIndex))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this no longer necessary here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK Code contracts don't work. They're left over from when this code was initially ported over. Right @Tratcher ?
Contributes to #24055