Skip to content

feat: add scoped usedClassMembers rules#129

Merged
BartWaardenburg merged 1 commit into
fallow-rs:mainfrom
M-Hassan-Raza:feat/scoped-used-class-members
Apr 17, 2026
Merged

feat: add scoped usedClassMembers rules#129
BartWaardenburg merged 1 commit into
fallow-rs:mainfrom
M-Hassan-Raza:feat/scoped-used-class-members

Conversation

@M-Hassan-Raza
Copy link
Copy Markdown
Contributor

Closes #117.

usedClassMembers was still effectively a flat name-based allowlist for common method names like refresh() and execute(), which could hide genuinely unused methods on unrelated classes. The export { Foo } path also dropped class members and heritage, so scoped rules never applied to that export style.

This change adds extends and implements scoped usedClassMembers entries, extracts class heritage for direct exports, default exports, and local export specifiers, preserves class member metadata for local export aliases, keys member usage by exported symbol identity instead of bare export name, and rejects unconstrained object-form rules instead of silently treating them as global allowlists.

That keeps framework-invoked methods suppressed only where the class contract actually matches while still reporting unrelated dead methods elsewhere in the workspace.

Validation
cargo fmt --all -- --check
cargo test --workspace
cargo clippy --workspace -- -D warnings

@BartWaardenburg BartWaardenburg force-pushed the feat/scoped-used-class-members branch 2 times, most recently from eb17714 to 604f0f7 Compare April 17, 2026 10:35
@BartWaardenburg BartWaardenburg force-pushed the feat/scoped-used-class-members branch from 604f0f7 to 7ed38f1 Compare April 17, 2026 10:52
@BartWaardenburg BartWaardenburg merged commit c7cfff3 into fallow-rs:main Apr 17, 2026
37 checks passed
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.

Scoped usedClassMembers with implements/extends constraints

2 participants