Skip to content

Reject invalid view-model mapping contracts (SVL0006) - #14

Merged
wieslawsoltes merged 4 commits into
mainfrom
codex/analyze-and-implement-improvements-for-issue-10
Aug 11, 2026
Merged

wieslawsoltes merged 4 commits into
mainfrom
codex/analyze-and-implement-improvements-for-issue-10

Conversation

@wieslawsoltes

@wieslawsoltes wieslawsoltes commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Issue scope

This PR does not fix issue #10, despite the branch name codex/analyze-and-implement-improvements-for-issue-10. Issue #10 requests Avalonia.Controls.ContentPage as a default view base type; this PR does not add or change default view base types.

The PR has no linked or closing GitHub issue.

Actual scope

Validates ViewModelMappingContracts entries instead of silently accepting closed generic types or ignoring malformed contracts.

  • requires each configured contract to be an unbound generic interface or class with exactly one type parameter
  • ignores invalid entries and reports SVL0006 at the locator declaration
  • covers non-generic and closed-generic invalid contracts
  • records SVL0006 in analyzer release tracking and documentation
  • retains the existing ambiguity, constructor, and locator-accessibility coverage from main

Validation

  • dotnet test StaticViewLocator.sln -c Release --nologo — 44 passed
  • dotnet build StaticViewLocator.sln -c Release --nologo — succeeded with 0 warnings and 0 errors
  • dotnet format StaticViewLocator.sln --verify-no-changes --no-restore — passed
  • git diff --check — passed
  • GitHub CI build and test jobs passed on Linux, macOS, and Windows; package creation passed

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pull-request-size pull-request-size Bot added size/M and removed size/L labels Aug 11, 2026
@wieslawsoltes wieslawsoltes changed the title Warn about invalid and ambiguous view-model mapping contracts (SVL001, SVL002) Reject invalid view-model mapping contracts (SVL0006) Aug 11, 2026
…lement-improvements-for-issue-10

# Conflicts:
#	StaticViewLocator.Tests/StaticViewLocatorGeneratorSnapshotTests.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Avalonia.Controls.ContentPage as a default view base type

1 participant