Skip to content

Fix various analyzer errors#9426

Merged
glen-84 merged 1 commit intomainfrom
gai/fix-analyzer-errors
Mar 23, 2026
Merged

Fix various analyzer errors#9426
glen-84 merged 1 commit intomainfrom
gai/fix-analyzer-errors

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Mar 23, 2026

Summary of the changes (Less than 80 chars)

  • Fix various analyzer errors.

Copilot AI review requested due to automatic review settings March 23, 2026 13:14
@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Progress: 0/6 benchmarks completed — this report updates as each job finishes.

Simple Composite Query

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Deep Recursion Query

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Variable Batching Throughput

Req/s Err%
Constant 1 (50 VUs) pending pending
Ramping 1 (0-500-0 VUs) pending pending
Response Times
Min Med Avg P90 P95 Max
Constant 1 pending pending pending pending pending pending
Ramping 1 pending pending pending pending pending pending

Runner 1 = benchmarking-1

Run 23439144857 • Commit 3bd6712 • Mon, 23 Mar 2026 13:15:04 GMT

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 various C# analyzer warnings across the Mocha demo/test projects and parts of HotChocolate by applying small, non-functional cleanups and style fixes.

Changes:

  • Remove unused using directives in multiple test/demo/runtime files.
  • Apply analyzer-preferred style updates (add braces for single-line if statements, reformat multi-assign initializers).
  • Use modern C# collection expressions ([]) for empty arrays where applicable.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresMessageEnvelopeParserTests.cs Minor style updates (var, [] empty array) in test helper construction.
src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresDispatchHeaderTests.cs Remove unused using.
src/Mocha/test/Mocha.Transport.Postgres.Tests/PostgresDispatchEndpointTests.cs Remove unused using.
src/Mocha/test/Mocha.Transport.Postgres.Tests/Connection/PostgresConnectionManagerTests.cs Remove unused using.
src/Mocha/test/Mocha.Transport.Postgres.Tests/Behaviors/ConsumerLifecycleTests.cs Remove unused usings.
src/Mocha/src/Mocha.Transport.Postgres/PostgresMessagingTransport.cs Formatting-only changes for readability/analyzer compliance.
src/Mocha/src/Mocha.Transport.Postgres/PostgresMessageHeaders.cs Remove unused usings.
src/Mocha/src/Mocha.Transport.Postgres/Configurations/PostgresTransportConfiguration.cs Simplify base.Schema assignment to Schema.
src/Mocha/src/Demo/Demo.Shipping/Program.cs Remove unused usings.
src/Mocha/src/Demo/Demo.Shipping/Commands/ShipShipmentCommand.cs Add braces around if statements (style/analyzer).
src/Mocha/src/Demo/Demo.Shipping/Commands/ReceiveReturnPackageCommand.cs Remove unused using; add braces around if statements.
src/Mocha/src/Demo/Demo.Catalog/Program.cs Remove unused usings; add braces around if blocks in endpoints.
src/Mocha/src/Demo/Demo.Catalog/Commands/RequestQuickRefundCommand.cs Remove unused using; add braces around if statement.
src/Mocha/src/Demo/Demo.Catalog/Commands/PlaceOrderCommand.cs Add braces around if statements.
src/Mocha/src/Demo/Demo.Catalog/Commands/PlaceBulkOrderCommand.cs Remove unused using.
src/Mocha/src/Demo/Demo.Catalog/Commands/InitiateReturnCommand.cs Remove unused using; add braces around if statements.
src/Mocha/src/Demo/Demo.Billing/Program.cs Remove unused using.
src/Mocha/src/Demo/Demo.Billing/Commands/ProcessPaymentCommand.cs Add braces around if statements.
src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.BuildExecutionTree.cs Replace Array.Empty<T>() with [] (style/analyzer).
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs Remove unused using.
src/HotChocolate/AspNetCore/src/Transport.Http/DefaultGraphQLHttpClient.cs Indentation/formatting adjustment inside preprocessor blocks.

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

@glen-84 glen-84 merged commit 9629e07 into main Mar 23, 2026
132 of 138 checks passed
@glen-84 glen-84 deleted the gai/fix-analyzer-errors branch March 23, 2026 13:22
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (e491af1) to head (6f489e5).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9426   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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