Repository navigation
Add file-scoped named method call restrictions - #115
Merged
Merged
Conversation
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 #104 for the file-scoped syntactic MVP. Use should_not.contain_calls_named(:delete_all) or an array of exact names; optional NamedCallOptions receiver: :bare ignores explicitly received calls including self. This is not receiver inference, dynamic dispatch, or method protocol checking. CLI JSON includes the file, written method, receiver form, safe navigation and byte coordinates. Baselines accept at most the recorded number of occurrences for each file/name/form, not new duplicates. A shared source-only inventory avoids re-parsing per rule and leaves dependency graphs unchanged. CI covers both the source checkout and built gem. The updated semantic probes distinguish read vs delete_all with the same file dependency. Independent of #114 (merge-tree clean). Local Windows Ruby 4.0.6, five alternating trials on 300 generated files: 25 named checks in 171 ms with reuse vs 2,531 ms forcing a source pass before every rule; about 135 KiB extra retained heap after GC. Ordinary 25-rule graph checks observed 217 vs 222 ms with unchanged allocations; gem-load medians 456 vs 467 ms. These are fixture measurements, not platform-wide performance claims.