-
Notifications
You must be signed in to change notification settings - Fork 2
Fix Unit Test Lint Errors #116
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
Conversation
Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
…ence type") Signed-off-by: currantw <[email protected]>
Signed-off-by: currantw <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request resolves lint errors in unit test files by applying modern C# collection syntax, fixing nullable reference warnings, and removing unused imports. The changes bring the test code in line with current C# best practices while maintaining all test functionality.
Key Changes
- Updated to modern collection expression syntax (IDE0300, IDE0028, IDE0305, IDE0301)
- Added null-forgiving operators for intentional null test scenarios (CS8625, CS8604, CS8602, CS8629)
- Removed unused
using Xunit;andusing System.Linq;statements (IDE0005) - Fixed async methods without await by removing async keyword and adding explicit
Task.CompletedTaskreturns (CS1998)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| CommandTests.cs | Modernized collection initializations, added null-forgiving operators for test scenarios, removed unused Xunit import |
| SortedSetCommandTests.cs | Applied collection expressions, added null-forgiving operators, removed unused imports |
| ReadFromTests.cs | Fixed async method signatures, removed unused Xunit import |
| BoundaryTests.cs | Removed unused Xunit import |
| ConnectionMultiplexerReadFromMappingTests.cs | Removed unused Xunit import |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: currantw <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fix Unit Test Lint Errors
Fixes #114: Resolves all unit test lint errors.
Errors Fixed
!for intentional null test scenariosasynckeyword from methods withoutawaitoperators and added explicitreturn Task.CompletedTaskstatementsFiles Updated
Acceptance Criteria
dotnet build tests/Valkey.Glide.UnitTests/ --configuration Lint --framework net8.0dotnet test --filter "FullyQualifiedName~Valkey.Glide.UnitTests"