Skip to content
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

Suggest most similar function id when we can't find a function type #384

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

Alasdair
Copy link
Collaborator

Find identifier with smallest optimal string alignment (OSA) distance (within reason) and suggest it. Only do this if the OSA distance is 4 or less, and the strings only differ in length be two or less to avoid suggesting unrelated identifiers. These numbers just felt ok with some basic testing, but maybe a better heuristic exists.

Copy link

github-actions bot commented Nov 30, 2023

Test Results

       8 files  ±0       19 suites  ±0   0s ⏱️ ±0s
   570 tests +3     570 ✔️ +3  0 💤 ±0  0 ±0 
1 878 runs  +3  1 877 ✔️ +3  1 💤 ±0  0 ±0 

Results for commit 524332f. ± Comparison against base commit 818a7b9.

♻️ This comment has been updated with latest results.

Find identifier with smallest optimal string alignment (OSA) distance
(within reason) and suggest it. The max difference is the identifier
length - 3 clamped between 1 and 4. So a 4 character identifier will
only suggest 1 change edits, a 5 character identifier 2 character edits
and so on up to 4 edits.
@Alasdair Alasdair merged commit 6764ad3 into sail2 Dec 1, 2023
9 checks passed
@Alasdair Alasdair deleted the osa_tyerror branch December 1, 2023 00:11
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.

1 participant