-
Notifications
You must be signed in to change notification settings - Fork 53
Fix Stylecop warnings #532
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
torosent
commented
Dec 5, 2025
- Updated Directory.Build.props to suppress TFM support build warnings for net6.0.
- Refactored SampleUnitTests to improve code style and added nullability annotations.
- Modified LargePayloadConsoleApp to provide a default container name for payloads.
- Improved GrpcDurableTaskClient to handle null InstanceId gracefully.
- Added async methods for writing and reading payloads in BlobPayloadStore.
- Changed DurableTaskTestHost to use IHost instead of IWebHost for better compatibility.
- Enhanced TaskHubGrpcServer with additional comments and improved exception handling.
- Updated DurableTaskVersionUtil to handle potential null values for PackageVersion.
- Refined DurableTaskSchedulerClientExtensionsTests and ShimDurableTaskClientTests to include nullability annotations.
- Improved ExternalEventStackTests for better readability and error handling.
- Refactored GrpcSidecarFixture to utilize IHost for hosting.
- Enhanced OrchestrationErrorHandling and OrchestrationPatterns tests for better clarity and functionality.
- Updated DefaultScheduleClientTests and DefaultScheduledTaskClientTests to include nullability checks.
- Improved ScheduleConfigurationTests and ScheduleCreationOptionsTests for better exception handling.
- Enhanced DurableTaskSchedulerWorkerExtensionsTests for nullability and improved exception messages.
- Refined GrpcOrchestrationRunnerTests and RunBackgroundTaskLoggingTests for better clarity and consistency.
- Updated Directory.Build.props to suppress TFM support build warnings for net6.0. - Refactored SampleUnitTests to improve code style and added nullability annotations. - Modified LargePayloadConsoleApp to provide a default container name for payloads. - Improved GrpcDurableTaskClient to handle null InstanceId gracefully. - Added async methods for writing and reading payloads in BlobPayloadStore. - Changed DurableTaskTestHost to use IHost instead of IWebHost for better compatibility. - Enhanced TaskHubGrpcServer with additional comments and improved exception handling. - Updated DurableTaskVersionUtil to handle potential null values for PackageVersion. - Refined DurableTaskSchedulerClientExtensionsTests and ShimDurableTaskClientTests to include nullability annotations. - Improved ExternalEventStackTests for better readability and error handling. - Refactored GrpcSidecarFixture to utilize IHost for hosting. - Enhanced OrchestrationErrorHandling and OrchestrationPatterns tests for better clarity and functionality. - Updated DefaultScheduleClientTests and DefaultScheduledTaskClientTests to include nullability checks. - Improved ScheduleConfigurationTests and ScheduleCreationOptionsTests for better exception handling. - Enhanced DurableTaskSchedulerWorkerExtensionsTests for nullability and improved exception messages. - Refined GrpcOrchestrationRunnerTests and RunBackgroundTaskLoggingTests for better clarity and consistency.
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 PR addresses StyleCop warnings across the codebase by improving code style, adding nullability annotations, and refactoring various components for better maintainability and compatibility.
Key changes:
- Migrated gRPC hosting infrastructure from
IWebHosttoIHostfor better alignment with modern ASP.NET Core patterns - Added comprehensive nullability annotations to test methods and improved null handling throughout test code
- Extracted platform-specific async methods in
BlobPayloadStoreto handle multi-targeting scenarios with conditional compilation
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Build.props | Suppressed TFM support build warnings for net6.0 EOL targets |
| samples/AzureFunctionsUnitTests/SampleUnitTests.cs | Fixed spacing and added nullability constraint to BeginScope method |
| samples/LargePayloadConsoleApp/Program.cs | Added default value "payloads" for container name configuration |
| src/Client/Grpc/GrpcDurableTaskClient.cs | Added null coalescing to handle null InstanceId when logging |
| src/Extensions/AzureBlobPayloads/Options/LargePayloadStorageOptions.cs | Removed extraneous blank line |
| src/Extensions/AzureBlobPayloads/PayloadStore/BlobPayloadStore.cs | Extracted async write/read helpers with conditional compilation for multi-targeting |
| src/InProcessTestHost/DurableTaskTestHost.cs | Migrated from IWebHost to IHost using Host.CreateDefaultBuilder pattern |
| src/InProcessTestHost/Sidecar/Grpc/TaskHubGrpcServer.cs | Added XML documentation for StreamInstanceHistory method and fixed whitespace |
| src/Shared/AzureManaged/DurableTaskVersionUtil.cs | Added null coalescing for FileVersion and pragma warnings for CS0436 |
| test/Client/AzureManaged.Tests/DurableTaskSchedulerClientExtensionsTests.cs | Added nullability annotations and null-forgiving operators to test parameters |
| test/Client/OrchestrationServiceClientShim.Tests/ShimDurableTaskClientTests.cs | Changed async void to async Task for test method |
| test/Grpc.IntegrationTests/ExternalEventStackTests.cs | Improved null handling with throw expressions and removed unnecessary null assertions |
| test/Grpc.IntegrationTests/GrpcSidecarFixture.cs | Migrated from IWebHost to IHost with ConfigureWebHostDefaults |
| test/Grpc.IntegrationTests/OrchestrationErrorHandling.cs | Fixed spacing and added pragma warnings for obsolete serialization constructors |
| test/Grpc.IntegrationTests/OrchestrationPatterns.cs | Refactored filter logic for improved null safety and readability |
| test/ScheduledTasks.Tests/Client/DefaultScheduleClientTests.cs | Added nullability annotations and improved formatting of object initializers |
| test/ScheduledTasks.Tests/Client/DefaultScheduledTaskClientTests.cs | Extracted verification logic into helper method and added nullability annotations |
| test/ScheduledTasks.Tests/Models/ScheduleConfigurationTests.cs | Added nullability annotations to test parameters |
| test/ScheduledTasks.Tests/Models/ScheduleCreationOptionsTests.cs | Added nullability annotations to test parameters |
| test/Worker/AzureManaged.Tests/DurableTaskSchedulerWorkerExtensionsTests.cs | Added nullability annotations and fixed trailing whitespace |
| test/Worker/Grpc.Tests/GrpcOrchestrationRunnerTests.cs | Fixed spacing and changed async void to async Task |
| test/Worker/Grpc.Tests/RunBackgroundTaskLoggingTests.cs | Replaced Assert.True(false) with Assert.Fail for better clarity |