Skip to content

Completeness tests: every Queryable operator and every BCL array allocator covered or waived #240

Open

Description

@CaffeinatedCoder

Why

A rule's reach was a hand-picked list of framework APIs, and each API left off it was a silent gap: CMTK0005 knew three allocators and missed Array.CreateInstance, CreateInstanceFromArrayType and ArrayPool<T>.Rent (#228); the EF ordering check knew Select and the operators that pass elements on but not GroupBy, Join or SelectMany (#206). NotWireTypeTests already holds the base package to a completeness check by reflection; these rules have none.

Proposal

Completeness tests that enumerate the host's API by reflection and fail on any member neither covered nor waived with a reason:

  • every Queryable method that takes a lambda or returns an element is an Op in QueryShapes or a waiver (an operator EF does not translate);
  • every public BCL method that creates a T[], Span<T> or Memory<T> from a length (Array, GC, ArrayPool<T>, MemoryPool<T>, CollectionsMarshal, ...) is reported by CMTK0005 for a value object or waived.

A new framework method then fails a test on the SDK bump that brings it, not a review months later.

Done when

Both tests exist, pass, and each fails when one covered member is removed from the rule (shown per verify-the-guard).

Activity

  1. added this to the 2.4.0 milestone on Oct 31, 2026
  2. added
    tests
    package/analyzers
    package/efcore
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package/analyzerspackage/efcoretests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions