Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a collection of analyzer/style issues across Nitro CommandLine, HotChocolate Fusion, and Mocha projects to reduce warnings and keep code consistent with configured conventions.
Changes:
- Remove unused
usingdirectives and redundant casts across multiple test and source files. - Apply naming/style fixes (e.g.,
s_-prefixed static fields, const naming, formatting) and adopt collection expressions where applicable. - Simplify Nitro client API creation by passing
ApiKind?directly (removing a now-redundant mapping helper).
Reviewed changes
Copilot reviewed 139 out of 140 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Nitro/CommandLine/test/CommandLine.Tests/MockErrorFactory.cs | Simplifies mock setup by removing redundant casting and uses collection expressions. |
| src/Nitro/CommandLine/test/CommandLine.Tests/HttpClient/NitroClientRegistrationTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/WorkspacesCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/SetDefaultWorkspaceCommandTests.cs | Updates mock field usage to renamed session service mock. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Workspaces/CreateWorkspaceCommandTests.cs | Updates mock field usage to renamed session service mock. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/EditStagesCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Stages/DeleteStageCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Session/SessionCommandTestBase.cs | Updates session service mock usage and removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Schemas/PublishSchemaCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/PersonalAccessTokensCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/ValidateOpenApiCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/PublishOpenApiCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/OpenApi/OpenApiCommandTestBase.cs | Const naming cleanup and removes unused static import. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/UpdateMockCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/MocksCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mocks/CreateMockCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/ValidateMcpFeatureCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/UploadMcpFeatureCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/PublishMcpFeatureCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/McpCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/DeleteMcpFeatureCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Mcp/CreateMcpFeatureCollectionCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishValidateCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Fusion/FusionConfigurationPublishCommitCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Environments/EnvironmentsCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/CommandTestBase.cs | Renames session service mock field and updates DI replacement wiring. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ValidateClientCommandTests.cs | Removes unused usings. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/PublishClientCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/DeleteClientCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/CreateClientCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Clients/ClientsCommandTestBase.cs | Removes unused using and static import. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/SetApiSettingsCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ListApiCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/DeleteApiCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/CreateApiCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/Apis/ApisCommandTestBase.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/DeleteApiKeyCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/CreateApiKeyCommandTests.cs | Removes unused using. |
| src/Nitro/CommandLine/test/CommandLine.Tests/Commands/ApiKeys/ApiKeysCommandTestBase.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/ThrowHelper.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Services/Configuration/ConfigService.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Options/OptionalOutputFormatOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Helpers/ExamplesHelpAction.cs | Renames static field to s_ prefix and updates execution context access. |
| src/Nitro/CommandLine/src/CommandLine/Helpers/CommandExecutionContext.cs | Renames AsyncLocal field to s_services. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/ServiceCollectionExtensions.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/RootCommandExtensions.cs | Updates to renamed execution context field. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/OptionExtensions.cs | Updates to renamed execution context field and removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/NitroConsoleExtensions.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Extensions/CommandExtensions.cs | Updates to renamed execution context field. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/ShowWorkspaceCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Workspaces/ListWorkspaceCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/ListStagesCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/EditStagesCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Stages/DeleteStageCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/UploadSchemaCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Schemas/SchemaHelpers.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/RevokePersonalAccessTokenCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/Options/PersonalAccessTokenDescriptionOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/ListPersonalAccessTokenCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/PersonalAccessTokens/CreatePersonalAccessTokenCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/PublishOpenApiCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionNameOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/Options/OpenApiCollectionIdOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/ListOpenApiCollectionCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/OpenApi/DeleteOpenApiCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/UpdateMockCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/ListMockCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mocks/CreateMockCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/UploadMcpFeatureCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpFeatureCollectionNameOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/Options/McpFeatureCollectionIdOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/McpFeatureCollectionHelpers.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/ListMcpFeatureCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/DeleteMcpFeatureCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Mcp/CreateMcpFeatureCollectionCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Login/LoginCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/PublishCommand/FusionConfigurationPublishStartCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/PublishCommand/FusionConfigurationPublishingState.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/PublishCommand/FusionConfigurationPublishBeginCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionUploadCommand.cs | Removes unused usings and aliases. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionRunCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionMigrationHelpers.cs | Renames static options field to s_ prefix. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Fusion/FusionDownloadCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Environments/ShowEnvironmentCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Environments/ListEnvironmentCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Environments/CreateEnvironmentCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/UnpublishClientCommand.cs | Removes unused static import. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ShowClientCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/PublishClientCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/Options/ClientTagsToUnpublishOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/Options/ClientNameOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientVersionsCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientPublishedVersionsCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/ListClientCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DownloadClientCommand.cs | Removes unused static import. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/DeleteClientCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Clients/CreateClientCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/ShowApiCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/SetApiSettingsCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/Options/TreatDangerousAsBreakingOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/Options/ApiPathOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/Options/ApiNameOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/Options/ApiKindOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/Options/AllowBreakingSchemaChangesOption.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/ListApiCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/DeleteApiCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/Apis/CreateApiCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/ListApiKeyCommand.cs | Removes unused usings. |
| src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/DeleteApiKeyCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/CommandLine/Commands/ApiKeys/CreateApiKeyCommand.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Workspaces/WorkspacesClient.cs | Removes redundant self/namespace usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Workspaces/IWorkspacesClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Stages/StagesClient.cs | Removes redundant self/namespace usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Schemas/ISchemasClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/PersonalAccessTokens/PersonalAccessTokensClient.cs | Removes redundant self/namespace usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/PersonalAccessTokens/IPersonalAccessTokensClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/OpenApi/OpenApiClient.cs | Removes redundant self/namespace usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Mocks/MocksClient.cs | Removes redundant usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Mocks/IMocksClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Mcp/McpClient.cs | Removes redundant self/namespace usings. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Environments/IEnvironmentsClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Environments/EnvironmentsClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Clients/IClientsClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Apis/IApisClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/Apis/ApisClient.cs | Removes redundant ApiKind mapping helper and passes kind directly. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/ApiKeys/IApiKeysClient.cs | Removes unused using. |
| src/Nitro/CommandLine/src/ChilliCream.Nitro.Client/ApiKeys/ApiKeysClient.cs | Removes unused using. |
| src/Mocha/test/Mocha.Transport.InMemory.Tests/Behaviors/RedeliveryTests.cs | Removes unused using. |
| src/Mocha/src/Mocha.EntityFrameworkCore.Postgres/Scheduling/ScheduledMessageDispatcher.cs | Expands rollback try/catch for analyzer/style compliance. |
| src/Mocha/src/Mocha.EntityFrameworkCore.Postgres/Outbox/OutboxProcessor.cs | Expands rollback try/catch for analyzer/style compliance. |
| src/HotChocolate/Utilities/src/Utilities.Buffers/ChunkedArrayWriter.cs | Adds targeted pragma to avoid IDE suggestion incompatible with netstandard2.0. |
| src/HotChocolate/Fusion/test/Fusion.Execution.Tests/Transport/Http/DefaultGraphQLHttpClientTests.cs | Minor style updates (var in loops, collection expression spacing). |
| src/HotChocolate/Fusion/test/Fusion.Caching.Tests/FusionCachingTests.cs | Normalizes using directives and alias placement. |
| src/HotChocolate/Fusion/test/Fusion.AspNetCore.Tests/FileUploadTests.cs | Fixes minor formatting in object initializer. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Planning/OperationPlanner.cs | Replaces ImmutableStack.Empty assignment with collection expression. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Results/PathUtilities.cs | Renames static field to s_ prefix and updates usage. |
| src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Clients/SourceSchemaHttpClient.cs | Removes unused using and formats object initializer properties. |
| src/HotChocolate/Fusion/src/Fusion.Connectors.InMemory/DependencyInjection/InMemoryFusionGatewayBuilderExtensions.cs | Removes unused using. |
| src/HotChocolate/AspNetCore/test/Transport.Http.Tests/RequestDeduplicationHandlerTests.cs | Uses collection initializer syntax for multipart content to satisfy analyzers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9518 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced May 1, 2026
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 of the changes (Less than 80 chars)