Skip to content

Fix analyzer errors that fail the TUI.Cli release publish - #178

Merged
matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-02u3c5
Sep 29, 2026
Merged

matt-edmondson merged 1 commit into
mainfrom
claude/project-thread-02u3c5

Conversation

@matt-edmondson

Copy link
Copy Markdown
Contributor

Before: the Release step of the "Analyze & Release" job on main (run 36570689078) failed with Publish failed for TUI.Cli.csproj (win-x64). The win-x64 publish of TUI.Cli reported 16 analyzer errors in TUI.Cli/SampleCLI.cs. The plain build did not report them, so build and test both passed.

After: every error the log lists is fixed, and SampleCLI.cs now follows the same conventions as TUI.App.

#174 only fixed one indentation line. The other 15 errors were still there, which is why the publish kept failing.

How:

  • IDE0008: explicit types instead of var at lines 22, 25, 28, 41, 49, 64 and 76.
  • IDE0065: the usings on lines 3–7 now sit inside the file-scoped namespace, as in TUI.App/SampleApp.cs.
  • IDE0055: fixed the over-indented BorderStyle initializer on line 79.
  • CA2007: added .ConfigureAwait(false) to app.RunAsync() at (33,9), as TUI.App already does everywhere.
  • CA1859: CreateDemoUI at (38,28) now returns StackPanel instead of IUIElement. That made the ktsu.TUI.Core.Contracts using unused, so it is removed.
  • KTSU0002: added TUI.Cli/AssemblyInfo.cs with [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("ktsu.TUI.Test")]. This uses the analyzer's suggested form and matches TUI.App/AssemblyInfo.cs.

I did not build this locally because no .NET SDK was available. The fixes follow the reported line and column of each error.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RTMFFSY8FY5CpAhf6ikNH1


Generated by Claude Code

The RID publish of TUI.Cli failed on 16 analyzer errors in SampleCLI.cs
that the regular build does not surface:

- IDE0008: explicit types instead of var (lines 22, 25, 28, 41, 49, 64, 76)
- IDE0065: usings moved inside the file-scoped namespace (lines 3-7),
  matching TUI.App
- IDE0055: over-indented BorderStyle initializer (line 79)
- CA2007: ConfigureAwait(false) on app.RunAsync(), as TUI.App does (33,9)
- CA1859: CreateDemoUI returns StackPanel rather than IUIElement (38,28);
  the now-unused Contracts using is dropped
- KTSU0002: AssemblyInfo.cs exposing internals to ktsu.TUI.Test, the
  same form TUI.App uses

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTMFFSY8FY5CpAhf6ikNH1
@sonarqubecloud

Copy link
Copy Markdown

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