Merged
Conversation
The Microsoft.Extensions.* and System.* packages v10.x don't officially support net6.0, but we still target and test on it for compatibility. Also suppress CS8002 warnings for Dapper packages that lack strong names.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR eliminates compiler warnings to achieve a clean build by strategically suppressing infrastructure-related warnings and fixing code-level warning sources.
Key changes:
- Suppressed build warnings for target framework support across project and test files
- Fixed test code issues: made
AbstractConnectionTestFixtureabstract, updated test assertions to NUnit 4 style, removed unnecessary nullable annotation, and suppressed intentional self-comparison warning
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ClickHouse.Driver/ClickHouse.Driver.csproj | Suppresses TFM support build warnings for the main driver package |
| ClickHouse.Driver.Tests/ClickHouse.Driver.Tests.csproj | Suppresses TFM warnings and CS8002 (missing referenced assembly) for test project |
| ClickHouse.Driver.Tests/AbstractConnectionTestFixture.cs | Makes test fixture class abstract (was never directly instantiated) |
| ClickHouse.Driver.Tests/Types/JsonTypeTests.cs | Updates assertions from ClassicAssert to NUnit 4 Assert.That style |
| ClickHouse.Driver.Tests/ADO/RolesTests.cs | Removes nullable annotation from optional parameter (still defaults to null) |
| ClickHouse.Driver.Tests/ADO/ClickHouseClientSettingsTests.cs | Suppresses CS1718 warning for intentional self-comparison test |
| Assert.That((string)result["nested"]["level2_string"], Is.EqualTo("nested_value")); | ||
|
|
||
| // Assert non-hinted property | ||
| ClassicAssert.IsInstanceOf<JsonValue>(result["unhinted_float"]); |
There was a problem hiding this comment.
This assertion still uses the deprecated ClassicAssert API while the surrounding assertions were updated to Assert.That style. For consistency with the rest of the changes in this file, update this to Assert.That(result[\"unhinted_float\"], Is.InstanceOf<JsonValue>()).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix warnings that need to be fixed, suppress those that don't. Build now completes with no warnings.
Note
Build/Project
SuppressTfmSupportBuildWarningstoClickHouse.Driver.csprojand test csproj; addNoWarn=CS8002to test csprojTests
AbstractConnectionTestFixtureabstractJsonTypeTeststo useAssert.Thatstyle and precise comparisonsRolesTests, remove nullable annotation fromcommandRolesparameter while keeping defaultnullClickHouseClientSettingsTests, wrap self-comparison with#pragmato suppress CS1718Written by Cursor Bugbot for commit 05bfc54. This will update automatically on new commits. Configure here.