Cleanup: git config, implicit usings, test common fixes, and build props#4301
Cleanup: git config, implicit usings, test common fixes, and build props#4301paulmedynski wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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
.gitattributesand trims.gitignore(including adding a pattern for C# language server cache files). - Enables implicit usings in
Microsoft.Data.SqlClient.TestCommonand removes now-redundantusingdirectives / 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. |
| @@ -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."> | |||
There was a problem hiding this comment.
ToolsVersion is an antiquated attribute that the modern .NET SDK doesn't need specified.
| @@ -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"> | |||
There was a problem hiding this comment.
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)" /> |
There was a problem hiding this comment.
This was noise on the console.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Removed boilerplate that we weren't customizing.
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Housekeeping cleanup that removes unnecessary items and fixes minor issues:
.gitattributesand.gitignoreby removing redundant entriesusingdirectives from test common filestools/props/AssemblyInfo.props,AssemblyRef.props, andtools/targets/RepositoryInfo.targetsManualTesting.Tests.rulesetChanges
Checklist