GitNexus/gitnexus/test
smTheApex 75635638b1
feat(csharp): capture interface-to-interface heritage (#789)
The C# tree-sitter query set only matched `base_list` on
`class_declaration`, so interfaces extending other interfaces
(`interface IFoo : IBar`) were never captured as heritage edges.

This broke transitive interface implementation chains. For example,
given:

    interface IBase { }
    interface IFoo : IBase { }
    class MyClass : IFoo { }

only `MyClass -> IFoo` was emitted, and the `IFoo -> IBase` edge was
silently dropped. Any analysis that relies on walking the full
interface inheritance chain (e.g. "which classes implement IBase?")
therefore returned incomplete results.

This patch adds two new query patterns mirroring the existing
class_declaration heritage patterns, but targeting
`interface_declaration`:

    (interface_declaration name: (identifier) @heritage.class
      (base_list (identifier) @heritage.extends)) @heritage
    (interface_declaration name: (identifier) @heritage.class
      (base_list (generic_name (identifier) @heritage.extends))) @heritage

The existing heritage-processor pipeline already handles these
captures correctly once the query emits them, so no changes are
needed outside of tree-sitter-queries.ts.

Testing:
- New fixture `csharp-interface-heritage/` covering:
    * interface : interface  (single base)
    * interface : interface, interface  (multiple bases)
    * class : interface (where that interface derives from others)
- 6 new test cases in test/integration/resolvers/csharp.test.ts
  asserting exactly 4 IMPLEMENTS edges and 0 EXTENDS edges for the
  fixture.
- Full C# resolver suite: 175/175 passing, no regressions.

Co-authored-by: Prota100 <Prota100@users.noreply.github.com>
2026-04-11 17:41:51 +01:00
..
fixtures feat(csharp): capture interface-to-interface heritage (#789) 2026-04-11 17:41:51 +01:00
helpers Fix security issues and critical bugs found in code review (#709) 2026-04-10 05:20:29 +01:00
integration feat(csharp): capture interface-to-interface heritage (#789) 2026-04-11 17:41:51 +01:00
unit fix: map diff hunks to symbol line ranges in detect_changes (#779) 2026-04-11 11:29:52 +01:00
utils ci: add macOS to cross-platform test matrix (#208) 2026-03-07 10:38:32 +00:00
global-setup.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
vitest.d.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00