Skip to content

Fix various analyzer errors#9596

Merged
glen-84 merged 4 commits intomainfrom
gai/fix-analyzer-errors
Apr 26, 2026
Merged

Fix various analyzer errors#9596
glen-84 merged 4 commits intomainfrom
gai/fix-analyzer-errors

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Apr 24, 2026

Summary of the changes (Less than 80 chars)

  • Fix various analyzer errors.

Co-authored-by: Copilot <copilot@github.com>
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 a set of analyzer/style issues across the Nitro CLI, HotChocolate, Mocha, and CookieCrumble codebases to keep builds clean under strict warning/analyzer settings.

Changes:

  • Replaces some Encoding.UTF8.GetBytes(...) usages with UTF-8 byte string literals ("..."u8.ToArray()) in tests.
  • Removes unused using directives and adjusts formatting to satisfy analyzers.
  • Aligns naming/style patterns (e.g., s_ prefix for private static fields; simplifies some null checks/assignments).

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Nitro/CommandLine/test/CommandLine.Tests/GlobalOptionsTests.cs Simplifies HttpClient type reference.
src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionMigrationHelpersTests.cs Switches test inputs to UTF-8 byte string literals; removes unused System.Text.
src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionPublishCommand.cs Removes unused import.
src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionComposeCommand.cs Removes unused imports.
src/Mocha/src/Mocha.EntityFrameworkCore.Postgres/Outbox/PostgresMessageOutbox.cs Refactors transaction check pattern around outbox signaling.
src/HotChocolate/Fusion/test/Fusion.Packaging.Tests/FusionArchiveTests.cs Uses UTF-8 byte string literal for test payload.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/SimpleRequiresProvides/Reviews/ReviewType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/SimpleRequiresProvides/Products/ProductType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/SimpleRequiresProvides/Accounts/UserType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtension/B/UserType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtension/A/UserType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtension/A/QueryType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtends/B/UserType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtends/A/UserType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/Fed2ExternalExtends/A/QueryType.cs Doc comment reflow for analyzer compliance.
src/HotChocolate/Fusion/test/Fusion.Connectors.ApolloFederation.Compliance.Tests/Suites/ComplexEntityCall/Products/ProductListType.cs Removes unused import.
src/HotChocolate/Fusion/src/Fusion.Composition.ApolloFederation/RemoveFederationInfrastructure.cs Renames private static fields to s_ prefix and updates usages.
src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DefaultTypeInspector.cs Fixes comment indentation to satisfy analyzers.
src/HotChocolate/Core/src/Types/Types/Descriptors/Conventions/DefaultNamingConventions.cs Removes unused import.
src/HotChocolate/Core/src/Types/Types/Attributes/SubscribeAttribute.cs Removes unused import.
src/HotChocolate/Core/src/Types/Fetching/Extensions/ObjectFieldDataLoaderExtensions.cs Minor formatting change for generic parameter attribute.
src/HotChocolate/Core/src/Types/Extensions/SchemaBuilderExtensions.Middleware.cs Minor formatting change for generic parameter attribute.
src/HotChocolate/Core/src/Types/Execution/Pipeline/RequestClassMiddlewareFactory.cs Minor formatting change for generic parameter attribute.
src/CookieCrumble/src/CookieCrumble.HotChocolate/Formatters/StableSnapshotHelpers.cs Simplifies null-check assignment with ??=.

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

Comment thread src/Mocha/src/Mocha.EntityFrameworkCore.Postgres/Outbox/PostgresMessageOutbox.cs Outdated
@glen-84 glen-84 merged commit 368336a into main Apr 26, 2026
396 of 400 checks passed
@glen-84 glen-84 deleted the gai/fix-analyzer-errors branch April 26, 2026 10:15
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #9596       +/-   ##
==========================================
- Coverage   74.16%       0   -74.17%     
==========================================
  Files        2677       0     -2677     
  Lines      140790       0   -140790     
  Branches    16371       0    -16371     
==========================================
- Hits       104421       0   -104421     
+ Misses      30774       0    -30774     
+ Partials     5595       0     -5595     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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