Repository navigation
fix(analysis): resolve an aliased import of the owner as a direct owner call (#14508) #14513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
EffortlessSteven
wants to merge
15
commits into
main
Choose a base branch
from
fix/14508-aliased-owner-import
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
0ea255c
fix(analysis): credit aliased owner imports and fail closed on #[path…
EffortlessSteven fd720fb
test(corpus): scope RIPR-SPEC-0442 in the verdict coverage ledgers
EffortlessSteven b92ea64
fix(analysis): clear the clippy -D warnings failures at the reviewed …
EffortlessSteven 32b0455
fix(analysis): resolve a nested mod beside a non-mod.rs file
EffortlessSteven ca7e65d
fix(analysis): treat only the compilation-unit root as root-like
EffortlessSteven e51311b
fix(analysis): close the nested-bin and tuple-pattern false credits
EffortlessSteven 2837a33
recompose: move the evidence-promotion honesty corpus to a follow-up
EffortlessSteven 175ebc4
test(analysis): cover nested tuple and slice shadow patterns
EffortlessSteven 1086e7c
fix(analysis): resolve the test crate root for empty-alias credit
EffortlessSteven d2896b0
fix(analysis): scan every scoped-shadow form and fix the nested-bin f…
EffortlessSteven bb40f49
fix(analysis): resolve the crate root that declares a mixed-target ch…
EffortlessSteven 7d31633
fix(analysis): close four alias false-credit paths
EffortlessSteven cd89bfe
fix(analysis): fail closed on aliased owner lookalikes (#14508)
EffortlessSteven 2d8b5f5
fix(analysis): close alias shadowing edge cases
EffortlessSteven 0bd7c1f
Merge remote-tracking branch 'origin/main' into ripr-coding/14513-ali…
EffortlessSteven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Aliased direct import of the owner credits the owner only when the import | ||
| # names its module in the same compilation unit (#14508). | ||
| [[behavior]] | ||
| id = "RIPR-SPEC-0442" | ||
| name = "Aliased owner import credit" | ||
| spec = "docs/specs/RIPR-SPEC-0442-aliased-owner-import-credit.md" | ||
| tests = [ | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_an_integration_test_module_shadows_the_library_module_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_the_owner_is_a_nested_module_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_the_owner_is_a_mod_rs_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_sibling_module_declares_the_alias_name_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_the_test_module_declares_the_alias_name_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_local_function_shadows_it_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_binary_inline_module_shadows_the_library_module_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_binary_root_imports_the_library_root_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_bin_target_imports_a_library_module_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_bin_only_package_imports_its_own_module_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_the_crate_root_redirects_the_module_with_path_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_two_indexed_packages_when_alias_names_a_sibling_package_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_integration_test_when_owner_is_imported_under_an_alias_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_scoped_binding_shadows_it_then_owner_takes_no_value_from_it", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_free_and_an_associated_owner_share_the_name_then_associated_takes_no_value", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_qualified_call_shares_the_alias_then_owner_takes_no_value_from_it", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_table_covers_each_scanned_form", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_ignores_a_genuine_call_in_the_last_match_arm", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_keeps_a_real_match_arm_binding", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_sees_a_flat_tuple_pattern_binding", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_sees_a_nested_tuple_pattern_binding", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_sees_a_slice_pattern_binding", | ||
| "crates/ripr/src/analysis/extract/shadow.rs::fact_authority_tests::scoped_shadow_sees_a_binding_in_a_later_loop", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_library_child_module_imports_the_crate_root_owner_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_bin_only_child_module_imports_its_crate_root_owner_then_owner_keeps_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_binary_child_module_imports_the_binary_root_then_library_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_nearer_unsupported_import_shadows_it_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_closure_in_a_macro_token_tree_shadows_it_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_the_test_function_parameter_shadows_it_then_owner_gets_no_related_test", | ||
| "crates/ripr/src/analysis/test_grip_evidence/tests.rs::given_direct_owner_alias_when_a_cfg_gated_module_has_two_paths_then_owner_gets_no_related_test", | ||
| ] | ||
| fixtures = [ | ||
| "fixtures/evidence-promotion-honesty-corpus/corpus.json", | ||
| ] | ||
| code = [ | ||
| "crates/ripr/src/analysis/test_grip_evidence/related_tests.rs", | ||
| "crates/ripr/src/analysis/test_grip_evidence/related_tests/context.rs", | ||
| "crates/ripr/src/analysis/classify/const_flow.rs", | ||
| "crates/ripr/src/analysis/extract/shadow.rs", | ||
| "crates/ripr/src/analysis/syntax/ra.rs", | ||
| ] | ||
| outputs = [ | ||
| "docs/specs/RIPR-SPEC-0442-aliased-owner-import-credit.md", | ||
| ] | ||
| metrics = [ | ||
| "unit_test_pass_rate", | ||
| "corpus_case_pass_rate", | ||
| ] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| <!-- section: Fixed --> | ||
| - `ripr pilot` and the repo-exposure grip path credit a test that imports the | ||
| changed owner under an alias as a direct owner call when the import names the | ||
| owner's module in the same compilation unit (crate root, nested file module, | ||
| `mod.rs`, or an integration test's package-qualified import). A `crate::` | ||
| import in an integration test or a binary target names that unit's own | ||
| module, so it does not credit the library owner (#14508). |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.