Skip to content
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

Address all IDE0251 warnings and naming inconsistencies. #8617

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

IEvangelist
Copy link
Member

@IEvangelist IEvangelist commented Sep 1, 2023

Supersedes part of #8471

Microsoft Reviewers: Open in CodeFlow

@IEvangelist IEvangelist mentioned this pull request Sep 1, 2023
@IEvangelist IEvangelist merged commit 28256db into dotnet:main Sep 1, 2023
19 checks passed
private readonly INamedTypeSymbol? DateOnly;
private readonly INamedTypeSymbol DateTimeOffset;
private readonly INamedTypeSymbol? TimeOnly;
private INamedTypeSymbol _uri;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think "fixing" these helped in any way. And why was readonly removed in the process?

@@ -89,7 +89,7 @@ private void Resize(int sizeHint)
}

/// <inheritdoc />
public void Dispose()
public readonly void Dispose()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is misleading and should be reverted - the struct is actually unusable after Dispose is called.

@@ -178,13 +178,13 @@ public void Dispose()
/// Gets the position.
/// </summary>
/// <value>The position.</value>
public int Position => _previousBuffersSize + _bufferPos;
public readonly int Position => _previousBuffersSize + _bufferPos;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's quite pointless to add readonly modifiers to methods on ref structs...

@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants