Skip to content

Cleanup: git config, implicit usings, test common fixes, and build props#4301

Open
paulmedynski wants to merge 1 commit into
mainfrom
dev/paul/cleanup
Open

Cleanup: git config, implicit usings, test common fixes, and build props#4301
paulmedynski wants to merge 1 commit into
mainfrom
dev/paul/cleanup

Conversation

@paulmedynski
Copy link
Copy Markdown
Contributor

@paulmedynski paulmedynski commented May 21, 2026

Summary

Housekeeping cleanup that removes unnecessary items and fixes minor issues:

  • Git config: Simplified .gitattributes and .gitignore by removing redundant entries
  • Implicit usings: Enabled implicit usings TestCommon project and removed unnecessary using directives from test common files
  • Test common: Removed unused fixture imports and cleaned up test helper code
  • Build props: Updated tools/props/AssemblyInfo.props, AssemblyRef.props, and tools/targets/RepositoryInfo.targets
  • Ruleset: Minor update to ManualTesting.Tests.ruleset

Changes

  • 16 files changed, 43 insertions, 344 deletions (net reduction of ~300 lines)

Checklist

  • No functional changes
  • No public API changes
  • No breaking changes

Copilot AI review requested due to automatic review settings May 21, 2026 10:43
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board May 21, 2026
@paulmedynski paulmedynski added Code Health 💊 Issues/PRs that are targeted to source code quality improvements. Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. labels May 21, 2026
@paulmedynski paulmedynski moved this from To triage to In progress in SqlClient Board May 21, 2026
@paulmedynski paulmedynski added this to the 7.1.0-preview2 milestone May 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Housekeeping PR focused on reducing repository noise (git config + generated files), cleaning up MSBuild metadata, and streamlining test common sources to rely more on project-level compiler settings.

Changes:

  • Simplifies .gitattributes and trims .gitignore (including adding a pattern for C# language server cache files).
  • Enables implicit usings in Microsoft.Data.SqlClient.TestCommon and removes now-redundant using directives / nullable pragmas from common test code.
  • Cleans up build/analysis metadata files (MSBuild props/targets and the ManualTests ruleset).

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tools/targets/RepositoryInfo.targets Reduces build log verbosity for the translated ScmRepositoryUrl message.
tools/props/AssemblyRef.props Simplifies MSBuild project header metadata.
tools/props/AssemblyInfo.props Simplifies MSBuild project header metadata.
src/Microsoft.Data.SqlClient/tests/ManualTests/Microsoft.Data.SqlClient.ManualTesting.Tests.ruleset Removes Ruleset ToolsVersion metadata and normalizes formatting.
src/Microsoft.Data.SqlClient/tests/Common/Microsoft.Data.SqlClient.TestCommon.csproj Enables <ImplicitUsings> for the TestCommon helper library.
src/Microsoft.Data.SqlClient/tests/Common/LocalAppContextSwitchesHelper.cs Removes redundant using directives now covered by implicit usings.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/DatabaseObjects/DatabaseObject.cs Removes redundant using directives and normalizes doc comment whitespace.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/CspCertificateFixture.cs Removes redundant using directives now covered by implicit usings.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/ColumnMasterKeyCertificateFixture.cs Removes redundant using directives now covered by implicit usings.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/ColumnEncryptionCertificateFixture.cs Removes redundant using directives now covered by implicit usings.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/CertificateFixtureBase.cs Removes redundant using directives and normalizes whitespace.
src/Microsoft.Data.SqlClient/tests/Common/Fixtures/AzureKeyVaultKeyFixtureBase.cs Fixes malformed header comment and removes redundant using directives.
src/Microsoft.Data.SqlClient/tests/Common/DisposableArray.cs Removes redundant using directives and file-level nullable pragma (project-level nullable applies).
src/Directory.Build.props Simplifies MSBuild project header metadata and clarifies versioning comments.
.gitignore Trims ignore list and adds ignore for *.lscache.
.gitattributes Simplifies to line-ending normalization + workflow lock file attributes.

Comment thread src/Directory.Build.props
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="Latest">
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects.">
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ToolsVersion is an antiquated attribute that the modern .NET SDK doesn't need specified.

Comment thread src/Directory.Build.props
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file (and a few others below) don't have a Build target, so this was incorrect, and unnecessary anyway.

</SourceRoot>
</ItemGroup>
<Message Text="Final Translated ScmRepositoryUrl to $(ScmRepositoryUrl)" Importance="high" />
<Message Text="Final Translated ScmRepositoryUrl to $(ScmRepositoryUrl)" />
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was noise on the console.

Comment thread .gitignore
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reduced this to ignore files that we may actually create. I would rather see some unexpected files and then investigate why they have been created, than ignore them and never notice. If other folks use tooling that creates files we're no longer ignoring, please add them back with suitable comments.

Comment thread .gitattributes
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed boilerplate that we weren't customizing.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.78%. Comparing base (b700269) to head (3018a56).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4301      +/-   ##
==========================================
- Coverage   66.04%   64.78%   -1.27%     
==========================================
  Files         275      279       +4     
  Lines       42976    66211   +23235     
==========================================
+ Hits        28383    42892   +14509     
- Misses      14593    23319    +8726     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.78% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@paulmedynski paulmedynski marked this pull request as ready for review May 21, 2026 14:08
@paulmedynski paulmedynski requested a review from a team as a code owner May 21, 2026 14:08
@paulmedynski paulmedynski enabled auto-merge (squash) May 21, 2026 14:08
@paulmedynski paulmedynski moved this from In progress to In review in SqlClient Board May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. Code Health 💊 Issues/PRs that are targeted to source code quality improvements.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants