Skip to content

Fix ValidationReporter: remove static, wire via DI#16

Closed
Copilot wants to merge 2 commits into
Static-classfrom
copilot/sub-pr-14
Closed

Fix ValidationReporter: remove static, wire via DI#16
Copilot wants to merge 2 commits into
Static-classfrom
copilot/sub-pr-14

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

ValidationReporter was declared static but registered as a DI singleton, causing a build failure (CS0718: static types cannot be used as type arguments).

Changes

  • ValidationReporter.cs: Remove static from class and method declarations
  • ValidatorRunner.cs: Inject ValidationReporter via constructor; call as instance method
// Before
internal static class ValidationReporter { ... }
await ValidationReporter.Report(results); // called statically

// After
internal class ValidationReporter { ... }
internal sealed class ValidatorRunner(SlnxFileResolver resolver, ValidationCollector collector, ValidationReporter reporter)
{
    ...
    await reporter.Report(results); // injected instance
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: 304NotModified <5808377+304NotModified@users.noreply.github.com>
Copilot AI changed the title [WIP] Change ValidationReporter class to static Fix ValidationReporter: remove static, wire via DI Mar 6, 2026
@304NotModified 304NotModified deleted the copilot/sub-pr-14 branch March 7, 2026 23:11
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