Skip to content

Provide suggestions for invalid shape ID targets#466

Merged
mtdowling merged 1 commit intomasterfrom
suggest-for-missing-targets
Jun 15, 2020
Merged

Provide suggestions for invalid shape ID targets#466
mtdowling merged 1 commit intomasterfrom
suggest-for-missing-targets

Conversation

@mtdowling
Copy link
Copy Markdown
Member

When an invalid shape ID target is encountered, a "Did you mean X?" list
of shape IDs are suggested if any shape IDs in a model have a Levenshtein
edit distance of less than 2 characters. The shape IDs with the lowest
distance from the invalid shape ID are suggested. Closes #464.

This change also updates the error message for "shape has a/an X
relationship..." so that is uses the appropriate indefinte articale
based on if the relation type starts with a vowel.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

When an invalid shape ID target is encountered, a "Did you mean X?" list
of shape IDs are suggested if any shape IDs in a model have a Levenshtein
edit distance of less than 2 characters. The shape IDs with the lowest
distance from the invalid shape ID are suggested. Closes #464.

This change also updates the error message for "shape has a/an `X`
relationship..." so that is uses the appropriate indefinte articale
based on if the relation type starts with a vowel.
@mtdowling mtdowling merged commit 95e0dc6 into master Jun 15, 2020
@mtdowling mtdowling deleted the suggest-for-missing-targets branch June 23, 2020 00:20
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.

Feature request: fuzzy string match suggestions to missing model identities

2 participants