Skip to content

Add redundant Use analyzer and WithMock API - #546

Merged
Keboo merged 1 commit into
masterfrom
kepler/add-automocker-use-analyzer-2
Oct 22, 2026
Merged

Keboo merged 1 commit into
masterfrom
kepler/add-automocker-use-analyzer-2

Conversation

@Keboo

@Keboo Keboo commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add informational AMA0003 for unconfigured interface mocks passed to Use, recommending WithMock.
  • Detect redundant re-registration of mocks retrieved from the same AutoMocker; exclude class targets and conservatively preserve configured or ambiguous registrations.
  • Add generic and runtime-type WithMock APIs that create and register a fresh mock, with separate overload tests.
  • Document the public APIs, analyzer, and diagnostic factory in the docs folder.

Validation

Runtime and targeted analyzer tests passed during implementation. Tests could not be rerun after rebasing because the required .NET 10 SDK is no longer installed. Rebased onto the latest master documentation changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Keboo
Keboo enabled auto-merge (squash) October 22, 2026 01:41
@Keboo
Keboo merged commit 46c9bc2 into master Oct 22, 2026
3 checks passed
@Keboo
Keboo deleted the kepler/add-automocker-use-analyzer-2 branch October 22, 2026 01:42
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.

1 participant