feat: add scoped usedClassMembers rules#129
Merged
BartWaardenburg merged 1 commit intoApr 17, 2026
Merged
Conversation
eb17714 to
604f0f7
Compare
604f0f7 to
7ed38f1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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