Skip to content

fix: exclude interfaces in inheritance-graph edges#2979

Open
rajatbeladiya wants to merge 1 commit intocrytic:masterfrom
rajatbeladiya:fix/inheritance-graph-ignore-interfaces-2150
Open

fix: exclude interfaces in inheritance-graph edges#2979
rajatbeladiya wants to merge 1 commit intocrytic:masterfrom
rajatbeladiya:fix/inheritance-graph-ignore-interfaces-2150

Conversation

@rajatbeladiya
Copy link

The inheritance-graph printer builds a filtered list of immediate inheritance (excluding mocks and, by default, interfaces). However, when the filtered list had length 1, it still emitted the edge using , which can be an interface depending on declaration order.

This PR uses the filtered list consistently, and adds a regression test where an interface is listed before a base contract.

Closes #2150.

@rajatbeladiya rajatbeladiya requested a review from smonicas as a code owner March 4, 2026 11:10
@CLAassistant
Copy link

CLAassistant commented Mar 4, 2026

CLA assistant check
All committers have signed the CLA.

Use the filtered immediate inheritance list when emitting edges so interfaces are excluded by default unless --include-interfaces is set. Adds regression test where interface appears before base contract.
@rajatbeladiya rajatbeladiya force-pushed the fix/inheritance-graph-ignore-interfaces-2150 branch from f1e1382 to ec251d1 Compare March 5, 2026 04:40
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.

ignore interfaces for inheritance-graph printer

2 participants