Skip to content

Cleanup | Sort Modifiers#4412

Open
benrr101 wants to merge 1 commit into
mainfrom
dev/russellben/inconsistent-modifiers
Open

Cleanup | Sort Modifiers#4412
benrr101 wants to merge 1 commit into
mainfrom
dev/russellben/inconsistent-modifiers

Conversation

@benrr101

Copy link
Copy Markdown
Contributor

Description

While waiting on some 🤖 analysis, I was looking through my old branches to see what's worth keeping what's too outdated to keep around. This was one of those branches I had intended to send out but never did. It's a very simple PR that just happens to touch about 107 lines of code.

Much of the original codebase contained "inconsistent" declaration modifiers. This PR cleans them up so that they are all in consistent order. I completely ignored all other possible changes except for these, so it should be a quick skim to approve it.

Testing

Everything still compiles. There are no functional changes, just syntactic cleanup, so pr pipeline should be sufficient.

@benrr101 benrr101 added this to the 7.1.0-preview3 milestone Jun 26, 2026
Copilot AI review requested due to automatic review settings June 26, 2026 22:13
@benrr101 benrr101 added the Code Health 💊 Issues/PRs that are targeted to source code quality improvements. label Jun 26, 2026
@benrr101 benrr101 requested a review from a team as a code owner June 26, 2026 22:13
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Normalizes declaration modifier ordering across SqlClient implementation code to improve consistency and readability, without changing behavior or public surface area.

Changes:

  • Reorders C# modifiers to a consistent style (e.g., internal static, protected override, public new, private static readonly).
  • Applies minor whitespace cleanup in a few comments/blank lines while preserving content.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStaticMethods.cs Reorders internal static modifiers; minor comment whitespace normalization.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserSafeHandles.windows.cs Reorders override modifiers (protected override).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlUtil.cs Reorders internal static methods and internal sealed class declaration.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlSymmetricKeyCache.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlStream.cs Reorders class modifiers and minor comment whitespace cleanup.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlSequentialTextReader.cs Reorders class modifiers; removes stray whitespace-only line.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlRowUpdatingEvent.cs Reorders new/override modifiers for properties.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlRowUpdatedEvent.cs Reorders new modifier for property.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlReferenceCollection.cs Reorders class modifiers and static readonly field modifiers.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlQueryMetadataCache.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInternalTransaction.cs Reorders class modifiers; trims whitespace in a string.Format line.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlInfoMessageEvent.cs Reorders override modifiers (public override).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlException.cs Reorders override modifiers (public override).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataReader.cs Reorders many member modifiers (public override, internal virtual, etc.).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDataAdapter.cs Reorders new/override modifiers on members.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionOptions.cs Reorders internal static method modifiers.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnection.cs Reorders new/override modifiers on members.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlCachedBuffer.cs Reorders override modifiers; minor comment whitespace cleanup.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SmiMetaData.cs Reorders expression-bodied property formatting and internal virtual order; minor comment whitespace cleanup.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Reliability/SqlConfigurableRetryFactory.cs Reorders static readonly field modifiers; trims trailing spaces in comment and signature spacing.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolGroup.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolAuthenticationContextKey.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/DbConnectionPoolAuthenticationContext.cs Reorders class modifiers (internal sealed).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/ProviderBase/DbReferenceCollection.cs Reorders abstract member modifiers (public abstract, protected abstract).
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/NameValuePair.cs Reorders private readonly field modifiers.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/IpAddressPreferenceUtilities.cs Reorders static readonly field modifiers; trims trailing whitespace in XML doc.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/AdapterUtil.cs Reorders private static and internal static method modifiers.
src/Microsoft.Data.SqlClient/src/Interop/Windows/Handles/SafeLibraryHandle.netcore.cs Reorders class/override modifiers (internal sealed, protected override).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Health 💊 Issues/PRs that are targeted to source code quality improvements.

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

4 participants