Skip to content

Fix indentation - #10001

Merged
glen-84 merged 2 commits into
mainfrom
gai/fix-indentation
Jun 29, 2026
Merged

Fix indentation#10001
glen-84 merged 2 commits into
mainfrom
gai/fix-indentation

Conversation

@glen-84

@glen-84 glen-84 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Apply whitespace and formatting cleanup across the codebase: collapse wrapped argument lists, foreach headers, and hash-code expressions that now fit on one line, and correct parameter-alignment indentation in the larger visitor and benchmark files.
  • Simplify redundant $"""{expectedErrorMessage}""" raw-string interpolations to the bare variable in the Nitro Fusion publish command tests.
  • Formatting only, no behavior change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 applies whitespace/formatting-only changes across multiple projects (HotChocolate, StrawberryShake, Nitro, Mocha), primarily adjusting indentation and line wrapping in C# code and embedded raw-string GraphQL/SQL/test snapshots to improve consistency and readability.

Changes:

  • Reflowed various wrapped constructs (e.g., foreach headers, argument lists, and hash-code expressions) to cleaner single-line or properly aligned multi-line formatting.
  • Normalized indentation inside embedded raw string literals (GraphQL SDL/queries, SQL, and test snapshot strings).
  • Simplified redundant raw-string interpolation usages in Nitro Fusion publish-related tests by snapshotting the expectedErrorMessage directly.

Reviewed changes

Copilot reviewed 17 out of 80 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/StrawberryShake/CodeGeneration/test/CodeGeneration.Tests/Analyzers/FragmentHelperTests.cs Collapse wrapped foreach headers in tests.
src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/SchemaGeneratorTests.cs Adjust indentation in embedded GraphQL strings.
src/StrawberryShake/CodeGeneration/test/CodeGeneration.CSharp.Tests/ScalarGeneratorTests.cs Adjust indentation in embedded GraphQL strings.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Utilities/EntityIdRewriter.cs Collapse wrapped foreach header.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Mappers/ResultFromEntityMapper.cs Align indentation in wrapped LINQ foreach.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Descriptors/DataTypeDescriptor.cs Reflow foreach formatting in constructor logic.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/Models/OperationModel.cs Align indentation for multi-line TryGetValue call.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/FragmentHelper.cs Reflow foreach/LINQ formatting inside analyzer logic.
src/StrawberryShake/CodeGeneration/src/CodeGeneration/Analyzers/DocumentAnalyzer.CollectOutputTypes.cs Collapse wrapped foreach header.
src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/TypeMapperGenerator_EntityHandler.cs Collapse wrapped foreach header.
src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/OperationServiceGenerator.cs Fix parameter indentation alignment.
src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/JsonResultBuilderGenerator_BuildData.cs Collapse wrapped foreach header.
src/StrawberryShake/CodeGeneration/src/CodeGeneration.CSharp/Generators/DependencyInjectionGenerator.cs Collapse wrapped foreach headers.
src/StrawberryShake/Client/src/Transport.WebSockets/Protocols/GraphQLWebSocket/GraphQLWebSocketMessageParser.cs Remove awkward line break in if (...) condition.
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/GlobalOptionsCommandTests.cs Adjust snapshot indentation for CLI validation error output.
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionPublishCommandTests.cs Simplify snapshot usage and normalize snapshot indentation.
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs Snapshot expectedErrorMessage directly (remove redundant raw-string wrapper).
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs Snapshot expectedErrorMessage directly (remove redundant raw-string wrapper).
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCancelCommandTests.cs Snapshot expectedErrorMessage directly (remove redundant raw-string wrapper).
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishBeginCommandTests.cs Snapshot expectedErrorMessage directly (remove redundant raw-string wrapper).
src/Mocha/src/Mocha.Transport.Postgres/Topology/PostgresSubscription.cs Normalize indentation in interpolated SQL raw string.
src/Mocha/src/Mocha.Transport.Postgres/Tasks/QueueMonitoringTask.cs Normalize indentation in interpolated SQL raw string.
src/Mocha/src/Mocha.EntityFrameworkCore.Postgres/Outbox/PostgresMessageOutboxQueries.cs Fix indentation alignment in SQL update statement.
src/HotChocolate/Raven/test/Data.Raven.Sorting.Tests/QueryableSortVisitorObjectTests.cs Adjust indentation in embedded GraphQL query strings.
src/HotChocolate/Mutable/src/Types.Mutable/Extensions/DirectiveLocationExtensions.cs Re-indent dictionary initializer for consistency.
src/HotChocolate/MongoDb/test/Data.MongoDb.Paging.Tests/MongoDbRelayTests.cs Adjust indentation in embedded GraphQL query strings.
src/HotChocolate/MongoDb/src/Data/Filters/Convention/Extensions/MongoDbFilterConventionDescriptorExtensions.cs Re-indent fluent binding chain.
src/HotChocolate/Language/test/Language.Tests/Visitors/SyntaxRewriterTests.cs Adjust indentation in embedded SDL string.
src/HotChocolate/Language/test/Language.Tests/Parser/Utf8HelperTests.cs Fix indentation alignment of method parameters.
src/HotChocolate/Language/test/Language.SyntaxTree.Tests/EnumTypeExtensionNodeTests.cs Re-align constructor argument indentation in tests.
src/HotChocolate/Language/test/Language.SyntaxTree.Tests/EnumTypeDefinitionNodeTests.cs Re-align constructor argument indentation in tests.
src/HotChocolate/Language/src/Language.Web/Sha256DocumentHashProvider.cs Fix constructor initializer indentation.
src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker~1.Leave.cs Re-align method parameter indentation.
src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker~1.Enter.cs Re-align method parameter indentation.
src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker.Leave.cs Re-align method parameter indentation.
src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker.Enter.cs Re-align method parameter indentation.
src/HotChocolate/Language/src/Language.SyntaxTree/NameNode.cs Collapse GetHashCode expression to one line.
src/HotChocolate/Fusion/test/Fusion.Utilities.Tests/Rewriters/InlineFragmentOperationRewriterTests.cs Adjust indentation in embedded GraphQL query strings.
src/HotChocolate/Fusion/test/Fusion.Utilities.Tests/Rewriters/DocumentRewriterTests.cs Adjust indentation in embedded GraphQL query strings.
src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Planning/FusionBenchmarkTests.cs Normalize indentation in large embedded GraphQL query.
src/HotChocolate/Fusion/test/Fusion.Composition.Tests/PostMergeValidationRules/RequireInvalidFieldsRuleTests.cs Adjust indentation in embedded SDL string.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/RequireTests.cs Adjust indentation in embedded GraphQL query string.
src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/GlobalObjectIdentificationTests.cs Fix indentation of raw string argument.
src/HotChocolate/Fusion/src/Fusion.Execution.Types/Directives/LookupDirective.cs Normalize indentation of SDL comment block.
src/HotChocolate/Fusion/src/Fusion.Execution.Types/Directives/ImplementsDirectiveParser.cs Normalize indentation of SDL comment block.
src/HotChocolate/Fusion/benchmarks/Fusion.Execution.Benchmarks/FusionBenchmarkBase.cs Normalize indentation in large embedded GraphQL query.
src/HotChocolate/Data/test/Data.Tests/IntegrationTests.cs Adjust indentation in embedded GraphQL fragment strings.
src/HotChocolate/Data/test/Data.Sorting.SqlLite.Tests/QueryableSortVisitorObjectTests.cs Adjust indentation in embedded GraphQL query strings.
src/HotChocolate/Data/test/Data.Sorting.SqlLite.Tests/QueryableSortVisitorExpressionTests.cs Fix indentation in array initializer.
src/HotChocolate/Data/test/Data.Sorting.InMemory.Tests/QueryableSortVisitorExpressionTests.cs Fix indentation in array/object initializers.
src/HotChocolate/Data/test/Data.Filters.Tests/Expression/FilterVisitorTestBase.cs Fix indentation in lambda expression formatting.
src/HotChocolate/Core/test/Validation.Tests/DocumentValidatorTests.cs Adjust indentation in embedded GraphQL document.
src/HotChocolate/Core/test/Types.Tests/Types/Validation/DirectiveValidationRuleTests.cs Normalize indentation in embedded SDL strings.
src/HotChocolate/Core/test/Types.Tests/Types/DirectiveTypeTests.cs Normalize indentation in embedded SDL string.
src/HotChocolate/Core/test/Types.Tests/SchemaFirstTests.cs Normalize indentation in embedded SDL string.
src/HotChocolate/Core/test/Types.Analyzers.Tests/ObjectTypeTests.XmlDocInference.Ported.cs Normalize indentation in embedded source snapshot string.
src/HotChocolate/Core/test/Types.Analyzers.Tests/ObjectTypeTests.XmlDocInference.cs Normalize indentation in embedded source snapshot strings.
src/HotChocolate/Core/test/Execution.Tests/SchemaFirstTests.cs Normalize indentation in embedded SDL string.
src/HotChocolate/Core/test/Execution.Tests/Processing/OperationCompilerTests.cs Normalize indentation of closing delimiters in raw strings.
src/HotChocolate/Core/test/Execution.Tests/Integration/TypeConverter/TypeConverterTests.ExceptionPropagation.cs Normalize indentation in theory data initialization.
src/HotChocolate/Core/src/Validation/TypeDocumentValidatorVisitor.cs Re-align method parameter indentation.
src/HotChocolate/Core/src/Validation/Rules/VariableVisitor.cs Re-align method parameter indentation.
src/HotChocolate/Core/src/Types/Utilities/ReflectionUtils.cs Fix indentation alignment in throw expression formatting.
src/HotChocolate/Core/src/Types/Utilities/DefaultTypeConverter.Setup.cs Fix indentation alignment of method parameter list.
src/HotChocolate/Core/src/Types/Types/Scalars/IntegerTypeBase.cs Fix base-constructor indentation.
src/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs Fix base-constructor indentation.
src/HotChocolate/Core/src/Types/Types/Helpers/DescriptorHelpers.cs Fix indentation alignment of method parameters.
src/HotChocolate/Core/src/Types/Types/Descriptors/UnionTypeDescriptor.cs Fix indentation alignment of null-coalescing throw.
src/HotChocolate/Core/src/Types/SchemaErrorBuilder.cs Fix indentation alignment of method parameters.
src/HotChocolate/Core/src/Types/Internal/TypeExtensionHelper.cs Fix indentation alignment of lambda argument formatting.
src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Types.cs Fix indentation alignment of extension method signatures.
src/HotChocolate/Core/src/Types/Execution/Options/NodeIdSerializerOptions.cs Fix indentation alignment in exception construction.
src/HotChocolate/Core/src/Types/Execution/DependencyInjection/SchemaRequestExecutorBuilderExtensions.Types.cs Fix indentation alignment of extension method signatures.
src/HotChocolate/Core/src/Types/Configuration/ExtendedTypeRefEqualityComparer.cs Collapse hash computation to one line.
src/HotChocolate/Core/src/Types.Mutations/MutationConventionTypeInterceptor.cs Fix indentation alignment in Options construction.
src/HotChocolate/Caching/test/Caching.Tests/CacheControlTypeInterceptorTests.cs Normalize indentation in embedded SDL string.
src/HotChocolate/AspNetCore/test/AspNetCore.Tests.Utilities/Subscriptions/Apollo/WebSocketExtensions.cs Fix indentation alignment of method call arguments.
src/HotChocolate/AspNetCore/test/AspNetCore.Authorization.Tests/AuthorizationTests.cs Fix indentation alignment of lambda argument.
src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Utilities/ThrowHelper.cs Collapse method signature and align expression body formatting.
src/HotChocolate/AspNetCore/src/AspNetCore.Pipeline/Subscriptions/WebSocketConnection.cs Fix indentation alignment of method parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Patch coverage

88.9% of changed lines covered (176/198)

File Covered Changed Patch %
…/Core/src/Types/Execution/Options/NodeIdSerializerOptions.cs 0 1 0.0% 🔴
…/Core/src/Types/Types/Descriptors/UnionTypeDescriptor.cs 0 1 0.0% 🔴
…/src/Mocha.Transport.Postgres/Tasks/QueueMonitoringTask.cs 0 9 0.0% 🔴
…/Language/src/Language.Visitors/SyntaxWalker.Enter.cs 1 3 33.3% 🔴
…/Language/src/Language.Visitors/SyntaxWalker.Leave.cs 1 3 33.3% 🔴
…/Language/src/Language.Visitors/SyntaxWalker~1.Enter.cs 1 3 33.3% 🔴
…/Language/src/Language.Visitors/SyntaxWalker~1.Leave.cs 1 3 33.3% 🔴
…/HotChocolate/Core/src/Types/Internal/TypeExtensionHelper.cs 4 7 57.1% 🔴
…/AspNetCore/src/AspNetCore.Pipeline/Utilities/ThrowHelper.cs 2 2 100.0% 🟢
…/src/Types.Mutations/MutationConventionTypeInterceptor.cs 6 6 100.0% 🟢
…/src/Types/Configuration/ExtendedTypeRefEqualityComparer.cs 1 1 100.0% 🟢
…/HotChocolate/Core/src/Types/Types/Scalars/FloatTypeBase.cs 1 1 100.0% 🟢
…/HotChocolate/Core/src/Types/Types/Scalars/IntegerTypeBase.cs 1 1 100.0% 🟢
src/HotChocolate/Core/src/Types/Utilities/ReflectionUtils.cs 3 3 100.0% 🟢
…/HotChocolate/Language/src/Language.SyntaxTree/NameNode.cs 1 1 100.0% 🟢
…/Language/src/Language.Web/Sha256DocumentHashProvider.cs 1 1 100.0% 🟢
…/Extensions/MongoDbFilterConventionDescriptorExtensions.cs 41 41 100.0% 🟢
…/src/Types.Mutable/Extensions/DirectiveLocationExtensions.cs 83 83 100.0% 🟢
…/Outbox/PostgresMessageOutboxQueries.cs 1 1 100.0% 🟢
…/Mocha.Transport.Postgres/Topology/PostgresSubscription.cs 11 11 100.0% 🟢

+10 more changed files; see the JSON below for uncovered lines.

Uncovered changed lines (JSON)
{
  "sha": "ed2d039ecdc4b71cfb20a87c6ec3c93f07bfa885",
  "files": [
    { "path": "src/HotChocolate/Core/src/Types/Execution/Options/NodeIdSerializerOptions.cs", "ranges": [[56, 56]] },
    { "path": "src/HotChocolate/Core/src/Types/Types/Descriptors/UnionTypeDescriptor.cs", "ranges": [[95, 95]] },
    { "path": "src/Mocha/src/Mocha.Transport.Postgres/Tasks/QueueMonitoringTask.cs", "ranges": [[26, 34]] },
    { "path": "src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker.Enter.cs", "ranges": [[282, 282], [287, 287]] },
    { "path": "src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker.Leave.cs", "ranges": [[283, 283], [288, 288]] },
    { "path": "src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker~1.Enter.cs", "ranges": [[284, 284], [289, 289]] },
    { "path": "src/HotChocolate/Language/src/Language.Visitors/SyntaxWalker~1.Leave.cs", "ranges": [[283, 283], [288, 288]] },
    { "path": "src/HotChocolate/Core/src/Types/Internal/TypeExtensionHelper.cs", "ranges": [[29, 31]] }
  ]
}

Project coverage: 52.4% (216266/412352 lines)

@glen-84
glen-84 merged commit c30656a into main Jun 29, 2026
285 of 287 checks passed
@glen-84
glen-84 deleted the gai/fix-indentation branch June 29, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants