Skip to content

Simplify redundant type references in the Nitro CLI - #10411

Merged
glen-84 merged 1 commit into
mainfrom
gai/simplify-nitro-cli-qualified-names
Sep 21, 2026
Merged

glen-84 merged 1 commit into
mainfrom
gai/simplify-nitro-cli-qualified-names

Conversation

@glen-84

@glen-84 glen-84 commented Sep 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Collapses three fully qualified references in the Nitro CLI to their simple forms: the explicit <string> type argument on the Array.AsReadOnly call backing AgentRole.WellKnown, which the collection expression already infers, and the ChilliCream.Nitro.CommandLine.Services.Mail.MailMessage and System.Text.Json.JsonDocument qualifiers in two agent command test files.
  • The two qualifier sites are IDE0001 and IDE0002. Roslyn pins both to EnforceOnBuild.Never, so EnforceCodeStyleInBuild does not report them at any severity, which is why they survived the CI style gate. The IDE and dotnet format style --diagnostics IDE0001 IDE0002 do report them.

Test plan

  • dotnet build src/Nitro/CommandLine/Nitro.CommandLine.slnx -p:EnforceCodeStyleInBuild=true: clean across net8.0 through net11.0, with only the pre-existing ASPDEPR004/ASPDEPR008 obsoletion warnings in SystemBrowser.cs and FusionRunCommand.cs.
  • dotnet test src/Nitro/CommandLine/test/CommandLine.Tests --framework net10.0 --filter-class '*ReadMailCommandTests' --filter-class '*ShowTaskCommandTests': 23 passed, 0 failed, 0 skipped.

Copilot AI lite review requested due to automatic review settings September 21, 2026 08:26

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.

Copilot review overview

🟢 Approval recommended

No unresolved issues were identified that would block approval.

Review effort: Lite
Findings: None

What changed in this PR

Simplifies redundant type references in Nitro CLI source and tests without changing behavior.

Changes:

  • Removes the redundant generic type argument from Array.AsReadOnly.
  • Simplifies JSON and mail message type references in tests.
File Description
src/​Nitro/​CommandLine/​test/​CommandLine.Tests/​Commands/​Agent/​Tasks/​ShowTaskCommandTests.cs Updated as part of this pull request.
src/​Nitro/​CommandLine/​test/​CommandLine.Tests/​Commands/​Agent/​Mail/​ReadMailCommandTests.cs Updated as part of this pull request.
src/​Nitro/​CommandLine/​src/​CommandLine/​Services/​Workspace/​AgentRole.cs Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Patch coverage

0.0% of changed lines covered (0/1)

File Covered Changed Patch %
…/CommandLine/src/CommandLine/Services/Workspace/AgentRole.cs 0 1 0.0% 🔴
Uncovered changed lines (JSON)
{
  "sha": "faa6ea6edd621458677264afa4b538701ffc558d",
  "files": [
    { "path": "src/Nitro/CommandLine/src/CommandLine/Services/Workspace/AgentRole.cs", "ranges": [[15, 15]] }
  ]
}

Project coverage: 58.1% (290939/500358 lines)

@github-actions

Copy link
Copy Markdown
Contributor

✅ Nitro CLI E2E snapshots: no flow recordings changed vs main.

@glen-84
glen-84 merged commit 0775765 into main Sep 21, 2026
154 checks passed
@glen-84
glen-84 deleted the gai/simplify-nitro-cli-qualified-names branch September 21, 2026 08:37
This was referenced Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants