Enable IDE0370 and remove unnecessary suppression operators - #10012
#10012Merged
glen-84 merged 3 commits intoJun 30, 2026
mainChilliCream/graphql-platform:mainfrom
gai/enable-ide0370-remove-suppressionsChilliCream/graphql-platform:gai/enable-ide0370-remove-suppressionsCopy head branch name to clipboard
Merged
Enable IDE0370 and remove unnecessary suppression operators#10012glen-84 merged 3 commits intomainChilliCream/graphql-platform:mainfrom gai/enable-ide0370-remove-suppressionsChilliCream/graphql-platform:gai/enable-ide0370-remove-suppressionsCopy head branch name to clipboard
glen-84 merged 3 commits into
mainChilliCream/graphql-platform:mainfrom
gai/enable-ide0370-remove-suppressionsChilliCream/graphql-platform:gai/enable-ide0370-remove-suppressionsCopy head branch name to clipboard
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables the IDE0370 analyzer (“Remove unnecessary suppression operator”) as a warning and then updates a large portion of the codebase (production code, tests, benchmarks) to remove now-flagged null-forgiving (!) usages, adding localized #pragma warning disable IDE0370 only where deferred initialization still legitimately needs suppression.
Changes:
- Enabled
IDE0370as a warning in.editorconfig. - Removed unnecessary
!operators across multiple projects (HotChocolate, StrawberryShake, Mocha, GreenDonut, Nitro), mostly in tests and guard-proven code paths. - Added localized
#pragma warning disable IDE0370around specific deferred-initialization fields/properties wherenull!is still required.
Reviewed changes
Copilot reviewed 165 out of 165 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .editorconfig | Enable IDE0370 as a warning. |
| src/StrawberryShake/CodeGeneration/test/CodeGeneration.Razor.Tests/CSharpCompiler.cs | Added IDE0370 suppression to pinned-type fields block (see review comment). |
| src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/CSharpCompiler.cs | Added IDE0370 suppression to pinned-type fields block (see review comment). |
| src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityOrUnionDataHandler.cs | Remove unnecessary null-forgiving in generated pattern text. |
| src/StrawberryShake/Client/test/Transport.WebSocket.Tests/TestHelper/SocketClientStub.cs | Remove unnecessary default! suppression in test stub call tracking. |
| src/StrawberryShake/Client/test/Transport.WebSocket.Tests/SessionTests.cs | Remove unnecessary null! assignment in test setup. |
| src/StrawberryShake/Client/test/Transport.InMemory.Tests/InMemoryConnectionTests.cs | Remove unnecessary default! in test delegate. |
| src/StrawberryShake/Client/test/Core.Tests/Extensions/OperationResultExtensionTests.cs | Remove unnecessary null-forgiving operators in assertions and test mock members. |
| src/StrawberryShake/Client/src/Transport.Http/ResponseEnumerable.cs | Remove unnecessary default! on enumerator local. |
| src/Nitro/CommandLine/src/CommandLine/Helpers/SourceMetadataParser.cs | Remove unnecessary ! after GetString() where value-kind is validated. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DownloadClientCommand.cs | Remove unnecessary default! on value-type init property. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/Topology/RabbitMQExplicitTopologyTests.cs | Remove ! where null has already been asserted away in tests. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/RabbitMQTransportTests.cs | Remove ! after preceding Assert.NotNull checks. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/RabbitMQRoutingKeyTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/RabbitMQMessageEnvelopeParserTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/RabbitMQDispatchEndpointTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.RabbitMQ.Tests/Descriptors/RabbitMQDescriptorTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Topology/PostgresTopicTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Topology/PostgresSubscriptionTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Topology/PostgresQueueTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Topology/PostgresMessageTypeExtensionTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresTransportTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresMessageEnvelopeParserTests.cs | Remove ! after non-null assertions on nullable structs. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresHandlerClaimTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresDispatchHeaderTests.cs | Remove ! after non-null assertions and dictionary existence. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresDispatchEndpointTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/ErrorInfoTests.cs | Remove ! after non-null assertion. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Descriptors/PostgresTopologyDescriptorTests.cs | Remove ! after non-null assertion. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Descriptors/PostgresDescriptorTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.Postgres.Tests/Conventions/PostgresDefaultConventionTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Transport.InMemory.Tests/Topology/InMemoryMessagingTopologyTests.cs | Remove ! after topology initialization assumptions in tests. |
| src/Mocha/test/Mocha.Transport.InMemory.Tests/InMemoryTransportTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.Tests/Transport/MessageEnvelopeWriterTests.cs | Remove ! where non-null is established in test setup. |
| src/Mocha/test/Mocha.Tests/Transport/MessageEnvelopeReaderTests.cs | Remove ! after non-null assertions on nullable wrappers. |
| src/Mocha/test/Mocha.Tests/Topology/ChangeTokenSourceTests.cs | Remove ! after non-null assertion. |
| src/Mocha/test/Mocha.Tests/Serialization/SerializationTests.cs | Remove ! after non-null assertion. |
| src/Mocha/test/Mocha.Tests/MessageBusChangeTokenSourceTests.cs | Remove ! after non-null assertion. |
| src/Mocha/test/Mocha.Tests/Headers/HeadersTests.cs | Remove ! after non-null assertions on deserialization. |
| src/Mocha/test/Mocha.Tests/Headers/HeadersSerializationTests.cs | Remove ! after non-null assertions on serialization/deserialization. |
| src/Mocha/test/Mocha.Tests/Descriptions/MessageBusDescriptionVisitorTests.cs | Remove ! after non-null assertions. |
| src/Mocha/test/Mocha.EntityFrameworkCore.Postgres.Tests/SagaServiceRegistrationTests.cs | Remove unnecessary ! on FullName. |
| src/Mocha/test/Mocha.EntityFrameworkCore.Postgres.Tests/PostgresOutboxIntegrationTests.cs | Remove ! on DbSet where Set<T>() is non-null. |
| src/Mocha/test/Mocha.EntityFrameworkCore.Postgres.Tests/OutboxServiceRegistrationTests.cs | Remove unnecessary ! on FullName. |
| src/Mocha/test/Mocha.EntityFrameworkCore.Postgres.Tests/InboxServiceRegistrationTests.cs | Remove unnecessary ! on FullName. |
| src/Mocha/src/Mocha/Consumers/Consumer.cs | Remove unnecessary Configuration! where already required earlier in method. |
| src/HotChocolate/Raven/test/Data.Raven.Filters.Tests/QueryableFilterVisitorListTests.cs | Remove unnecessary null! in list test data. |
| src/HotChocolate/PersistedOperations/test/PersistedOperations.Redis.Tests/IntegrationTests.cs | Remove ! where test expects errors present. |
| src/HotChocolate/MongoDb/src/Data/Sorting/Handlers/MongoDbSortOperationHandlerBase.cs | Remove unnecessary null! assignment on out parameter. |
| src/HotChocolate/Marten/test/Data.Marten.Filters.Tests/QueryableFilterVisitorListTests.cs | Remove unnecessary null! in list test data. |
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs | Remove ! on test string payload after setup guarantees. |
| src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/ActivityTestHelper.cs | Remove ! after builder .Build() where result is non-null. |
| src/HotChocolate/Fusion/test/Fusion.Caching.Tests/FusionCachingTests.cs | Remove ! after non-null assertions on headers. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/SemanticIntrospectionTests.cs | Remove ! on ToString() usage after result setup. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/RequestGroupingExecutionTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/ProvidesTests.cs | Remove ! after non-null assertions; avoid suppressing GetString() result. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FusionTestBase.MatchSnapshot.cs | Remove unnecessary ! on MediaType. |
| src/HotChocolate/Fusion/src/Fusion.Subscriptions.Kafka/KafkaEventStreamBroker.cs | Remove ! on yielded message variable. |
| src/HotChocolate/Fusion/src/Fusion.Subscriptions.AzureEventHubs/AzureEventHubsEventStreamBroker.cs | Remove ! on options values passed to client ctor. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Subscriptions/EventMessage.cs | Remove ! after disposal checks establish non-null state. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/FetchResultStore.cs | Remove unnecessary ! on ref expression. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/OperationPlanContext.cs | Remove default! initializers from deferred-init fields/properties. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/Serialization/JsonOperationPlanParser.cs | Remove unnecessary ! on GetString() result. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/ReusableFieldContext.cs | Remove default! on deferred-init struct field. |
| src/HotChocolate/Fusion/src/Fusion.Execution/DependencyInjection/HotChocolateFusionServiceCollectionExtensions.cs | Remove unnecessary cast suppression on schemaName. |
| src/HotChocolate/Fusion/src/Fusion.Composition/ApolloFederation/TransformRequiresToRequire.cs | Remove unnecessary SelectionSet! suppression where guarded by condition. |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/VariableMergingBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/OperationPlannerBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/OperationCompilerBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/LockStoreBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/InlineFragmentOperationRewriterBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/HashCodeBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/GraphQLQueryBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/DocumentRewriterBenchmark.cs | Remove null! from benchmark fields (deferred initialization). |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityTestHelper.cs | Remove ! after builder .Build() where result is non-null. |
| src/HotChocolate/Data/test/Data.Tests/ProjectableDataLoaderTests.cs | Remove unnecessary null! in test-only resolver. |
| src/HotChocolate/Data/test/Data.Tests/PagingHelperIntegrationTests.cs | Remove ! after dictionary lookup preconditions. |
| src/HotChocolate/Data/test/Data.Tests/IntegrationTests.cs | Replace default! with default in test resolvers. |
| src/HotChocolate/Data/test/Data.Sorting.Tests/SortProviderExtensionsTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Data/test/Data.Sorting.Tests/SortConventionExtensionsTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Data/test/Data.Sorting.Tests/Context/SortingContextTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Data/test/Data.Projections.Tests/ProjectionConventionExtensionsTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Data/test/Data.PostgreSQL.Tests/AsSelectorRecordProjectionTests.cs | Remove ! after non-null assertion. |
| src/HotChocolate/Data/test/Data.PostgreSQL.Tests/AsSelectorEncapsulatedProjectionTests.cs | Remove ! after non-null assertion. |
| src/HotChocolate/Data/test/Data.Filters.Tests/Types/ComparableOperationInputTests.cs | Remove unnecessary = null! initializer on nullable property. |
| src/HotChocolate/Data/test/Data.Filters.Tests/FilterProviderExtensionsTests.cs | Remove ! after non-null assertion. |
| src/HotChocolate/Data/test/Data.Filters.Tests/FilterConventionExtensionsTests.cs | Remove ! after non-null assertion. |
| src/HotChocolate/Data/test/Data.Filters.Tests/Context/FilterContextTests.cs | Remove ! after non-null assertions. |
| src/HotChocolate/Data/test/Data.Filters.InMemory.Tests/Issue7110ReproTests.cs | Remove unnecessary ! on variable assignment. |
| src/HotChocolate/Data/test/Data.EntityFramework.Tests/BookContext.cs | Remove unnecessary Author! suppression in relationship mapping. |
| src/HotChocolate/Data/src/Data/Sorting/Expressions/QueryableSortExpressionOptimizer.cs | Remove ! where member list is proven non-null by pattern. |
| src/HotChocolate/Data/src/Data/Filters/Visitor/FilterOperationHandler.cs | Remove unnecessary default! out assignment. |
| src/HotChocolate/Data/src/Data/Filters/Convention/FilterConvention.cs | Remove unnecessary null-forgiving on delegate invocation. |
| src/HotChocolate/Core/test/Validation.Tests/FieldsOnCorrectTypeRuleTests.cs | Remove null! in test resolvers. |
| src/HotChocolate/Core/test/Types.Tests/Types/Scalars/UuidTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Tests/Types/Scalars/DateTimeTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Tests/Types/Scalars/BooleanTypeTests.cs | Remove ! after type assertion. |
| src/HotChocolate/Core/test/Types.Tests/Types/ObjectTypeTests.cs | Adjust test resolvers to avoid unnecessary suppression. |
| src/HotChocolate/Core/test/Types.Tests/Types/ObjectTypeExtensionTests.cs | Remove null! return suppression in test helper method. |
| src/HotChocolate/Core/test/Types.Tests/Resolvers/ResolverCompilerTests.cs | Remove unnecessary != null! patterns in tests. |
| src/HotChocolate/Core/test/Types.Tests/Configuration/TypeDiscovererTests.cs | Remove null! initializers in #nullable disable test models. |
| src/HotChocolate/Core/test/Types.Scalars.Tests/UtcOffsetTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Scalars.Tests/LongitudeTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Scalars.Tests/LatitudeTypeTests.cs | Remove ! after coercion where non-null is expected. |
| src/HotChocolate/Core/test/Types.Queries.Tests/CodeFirstSchemaTests.cs | Replace default! with default in test query method. |
| src/HotChocolate/Core/test/Types.CursorPagination.Tests/UseConnectionAttributeTests.cs | Remove ! where errors are expected to exist. |
| src/HotChocolate/Core/test/Execution.Tests/ScalarExecutionErrorTests.cs | Remove unnecessary ! after GetString() where kind is validated. |
| src/HotChocolate/Core/test/Execution.Tests/CodeFirstTests.cs | Remove ! where errors are expected to exist. |
| src/HotChocolate/Core/test/Authorization.Tests/CodeFirstAuthorizationTests.cs | Remove ! after non-null ContextData assertion. |
| src/HotChocolate/Core/test/Authorization.Tests/AnnotationBasedAuthorizationTests.cs | Remove ! after non-null ContextData assertion. |
| src/HotChocolate/Core/test/Abstractions.Tests/FieldResultTests.cs | Remove ! where errors are expected to exist. |
| src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs | Remove ! on DeclaringType where it’s assumed present. |
| src/HotChocolate/Core/src/Types/Utilities/Serialization/InputObjectCompiler.cs | Remove unnecessary ! on reflection lookup and rely on existing assert. |
| src/HotChocolate/Core/src/Types/Utilities/ReflectionUtils.cs | Remove ! when building namespace for nested types. |
| src/HotChocolate/Core/src/Types/Utilities/ObjectToDictionaryConverter.cs | Remove unnecessary ! on ToString() result. |
| src/HotChocolate/Core/src/Types/Types/Scalars/DurationType.cs | Remove ! after GetString(). |
| src/HotChocolate/Core/src/Types/Types/Relay/Serialization/OptimizedNodeIdSerializer.cs | Replace null! comparisons with null. |
| src/HotChocolate/Core/src/Types/Types/Pagination/PagingHelper.cs | Remove ! where element type is expected. |
| src/HotChocolate/Core/src/Types/Types/ObjectField.cs | Remove unnecessary Resolver! suppression in ctor. |
| src/HotChocolate/Core/src/Types/Types/InterfaceType.Initialization.cs | Add localized IDE0370 pragma around deferred-init Schema field. |
| src/HotChocolate/Core/src/Types/Types/InputObjectType.Initialization.cs | Add localized IDE0370 pragma around deferred-init delegates. |
| src/HotChocolate/Core/src/Types/Types/Extensions/SubscribeResolverObjectFieldDescriptorExtensions.cs | Remove ! on ToString() for topic key creation. |
| src/HotChocolate/Core/src/Types/SchemaErrorBuilder.Error.cs | Remove ! in path serialization. |
| src/HotChocolate/Core/src/Types/Schema.cs | Add localized IDE0370 pragmas around deferred-init schema properties. |
| src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ClaimsPrincipalParameterExpressionBuilder.cs | Remove unnecessary ! from GetGlobalState<T> call. |
| src/HotChocolate/Core/src/Types/Resolvers/AggregateServiceScopeInitializer.cs | Remove ! on ref local before calling Initialize. |
| src/HotChocolate/Core/src/Types/Execution/Processing/SelectionLookup.cs | Replace null! out assignment with null. |
| src/HotChocolate/Core/src/Types/Execution/Processing/OperationResolverHelper.cs | Remove ! where pattern ensures non-null name. |
| src/HotChocolate/Core/src/Types/Execution/Processing/OperationContext.Pooling.cs | Remove unnecessary ! where memory is established. |
| src/HotChocolate/Core/src/Types/Execution/Processing/MiddlewareContext.State.cs | Add localized IDE0370 pragma around deferred-init dictionaries. |
| src/HotChocolate/Core/src/Types/Execution/Processing/MiddlewareContext.Selection.cs | Add localized IDE0370 pragma around deferred-init selection field. |
| src/HotChocolate/Core/src/Types/Execution/Processing/MiddlewareContext.Global.cs | Add localized IDE0370 pragma around deferred-init core fields. |
| src/HotChocolate/Core/src/Types/Execution/Processing/MiddlewareContext.Arguments.cs | Add localized IDE0370 pragma around deferred-init Arguments map. |
| src/HotChocolate/Core/src/Types/Configuration/TypeInitializer.cs | Remove ! on ToString() usage. |
| src/HotChocolate/Core/src/Types/Configuration/TypeInferencePathBuilder.cs | Remove ! on ToString() usage. |
| src/HotChocolate/Core/src/Types.Queries/QueryResultMiddleware.cs | Remove ! when unwrapping fieldResult.Value. |
| src/HotChocolate/Core/src/Types.NodaTime/DurationType.cs | Remove ! after GetString() in ISO parser call. |
| src/HotChocolate/Core/src/Types.Analyzers/Helpers/SymbolExtensions.cs | Remove ! after attribute access where filtered earlier. |
| src/HotChocolate/Core/src/Types.Analyzers/Helpers/GeneratorUtils.cs | Remove ! on ToString() results. |
| src/HotChocolate/Core/src/Features/FeatureReferences.cs | Replace null! with null in cache reset. |
| src/HotChocolate/Core/src/Execution.Projections/Extensions/HotChocolateExecutionSelectionExtensions.cs | Remove ! on FullName. |
| src/HotChocolate/Core/src/Execution.Abstractions/Execution/OperationDocumentInfo.cs | Replace null! with null during reset. |
| src/HotChocolate/Core/src/Execution.Abstractions/Error.cs | Remove unnecessary ! after null checks. |
| src/HotChocolate/Caching/test/Caching.Tests/CacheControlTypeInterceptorTests.cs | Replace default! with default for ValueTask returns in tests. |
| src/HotChocolate/Caching/test/Caching.Tests/CacheControlDirectiveTypeTests.cs | Remove ! after FirstOrDefault() and rely on explicit assert. |
| src/HotChocolate/Caching/test/Caching.Memory.Tests/CacheTests.cs | Remove ! after delegate non-null assertions. |
| src/HotChocolate/AspNetCore/test/Transport.Http.Tests/GraphQLHttpClientTests.cs | Remove ! on request body string where setup ensures non-null. |
| src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/GraphQLOverWebSocket/WebSocketProtocolTests.cs | Remove ! after HasValue checks. |
| src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Subscriptions/Apollo/WebSocketProtocolTests.cs | Remove ! after HasValue checks. |
| src/HotChocolate/AspNetCore/test/AspNetCore.Tests/Serialization/VariablePathTests.cs | Remove ! in linked-segment traversal where structure is asserted. |
| src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/UploadQuery.cs | Remove default! init for Optional property. |
| src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs | Remove ! after string null checks. |
| src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs | Remove ! after error-result existence is established. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Support/ParsingHelper.cs | Replace null! returns after Assert.Fail with null. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresScopesDirectiveTests.cs | Replace null! return after Assert.Fail with null. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/RequiresDirectiveTests.cs | Replace default! with default in resolvers. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ProvidesDirectiveTests.cs | Replace default! with default in resolvers. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/PolicyDirectiveTests.cs | Replace null! return after Assert.Fail with null. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/Legacy/RequiresDirectiveTests.cs | Replace default! with default in resolvers. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/Legacy/ProvidesDirectiveTests.cs | Replace default! with default in resolvers. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/Legacy/ExternalDirectiveTests.cs | Replace default! with default in resolver. |
| src/HotChocolate/ApolloFederation/test/ApolloFederation.Tests/Directives/ExternalDirectiveTests.cs | Replace default! with default in resolvers. |
| src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/OpenApi/OpenApiIntegrationTestBase.cs | Remove ! after wait loop ensures non-null output. |
| src/HotChocolate/Adapters/test/Adapters.OpenApi.Tests/Endpoints/HttpEndpointIntegrationTestBase.cs | Remove ! after wait loop ensures non-null response. |
| src/GreenDonut/src/GreenDonut/BatchDataLoader.cs | Remove unnecessary ! when map lookup establishes value presence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Patch coverage54.4% of changed lines covered (31/57) +24 more changed files; see the JSON below for uncovered lines. Uncovered changed lines (JSON){
"sha": "0168ac767358523245f5a0640cddbee2e08eae19",
"files": [
{ "path": "src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/MiddlewareHelper.cs", "ranges": [[22, 22]] },
{ "path": "src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs", "ranges": [[443, 443], [450, 450], [457, 457]] },
{ "path": "src/HotChocolate/Core/src/Execution.Projections/Extensions/HotChocolateExecutionSelectionExtensions.cs", "ranges": [[41, 41], [59, 59]] },
{ "path": "src/HotChocolate/Core/src/Features/FeatureReferences.cs", "ranges": [[101, 101]] },
{ "path": "src/HotChocolate/Core/src/Types/Execution/Processing/SelectionLookup.cs", "ranges": [[91, 91]] },
{ "path": "src/HotChocolate/Core/src/Types/Resolvers/AggregateServiceScopeInitializer.cs", "ranges": [[50, 50]] },
{ "path": "src/HotChocolate/Core/src/Types/Resolvers/Expressions/Parameters/ClaimsPrincipalParameterExpressionBuilder.cs", "ranges": [[63, 63]] },
{ "path": "src/HotChocolate/Core/src/Types/SchemaErrorBuilder.Error.cs", "ranges": [[81, 81]] },
{ "path": "src/HotChocolate/Core/src/Types/Types/Extensions/SubscribeResolverObjectFieldDescriptorExtensions.cs", "ranges": [[164, 164]] },
{ "path": "src/HotChocolate/Core/src/Types/Types/Pagination/PagingHelper.cs", "ranges": [[136, 136], [169, 169]] },
{ "path": "src/HotChocolate/Core/src/Types/Utilities/ObjectToDictionaryConverter.cs", "ranges": [[119, 119]] },
{ "path": "src/HotChocolate/Core/src/Types/Utilities/ThrowHelper.cs", "ranges": [[58, 58], [68, 68], [80, 80]] },
{ "path": "src/HotChocolate/Data/src/Data/Filters/Visitor/FilterOperationHandler.cs", "ranges": [[53, 53]] },
{ "path": "src/HotChocolate/Data/src/Data/Sorting/Expressions/QueryableSortExpressionOptimizer.cs", "ranges": [[189, 189]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Composition/ApolloFederation/TransformRequiresToRequire.cs", "ranges": [[102, 102]] },
{ "path": "src/HotChocolate/Fusion/src/Fusion.Subscriptions.AzureEventHubs/AzureEventHubsEventStreamBroker.cs", "ranges": [[278, 278], [280, 280]] },
{ "path": "src/HotChocolate/MongoDb/src/Data/Sorting/Handlers/MongoDbSortOperationHandlerBase.cs", "ranges": [[42, 42]] },
{ "path": "src/HotChocolate/Core/src/Execution.Abstractions/Error.cs", "ranges": [[132, 132]] },
{ "path": "src/HotChocolate/Core/src/Types.Analyzers/Helpers/GeneratorUtils.cs", "ranges": [[126, 126]] }
]
}Project coverage: 52.5% (216293/412377 lines) |
This was referenced Jul 7, 2026
This was referenced Jul 14, 2026
This was referenced Jul 24, 2026
chore(deps): Bump HotChocolate.Subscriptions.InMemory from 15.1.14 to 16.5.1
Kuestenlogik/Bowire#506
Merged
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.
Summary
IDE0370analyzer ("Remove unnecessary suppression operator") as a warning in.editorconfig.!null-forgiving operators across the source and test code.= null!deferred-initialization field genuinely needs the operator (e.g.Schema,MiddlewareContext,InputObjectType,InterfaceType), wrap it in#pragma warning disable IDE0370instead.Test plan
dotnet build src/All.slnxbuilds clean with noIDE0370warnings.!operator is compile-time only, so removals are behavior-neutral).