Skip to content

Add Similar Name Hint to Not Found Error - #289

Open
rcosta358 wants to merge 3 commits into
mainfrom
did-you-mean-hint
Open

Add Similar Name Hint to Not Found Error#289
rcosta358 wants to merge 3 commits into
mainfrom
did-you-mean-hint

Conversation

@rcosta358

@rcosta358 rcosta358 commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

This PR adds a “Did you mean?” hint to NotFoundError diagnostics.
When a variable, ghost, or alias cannot be found, LiquidJava compares its name with the elements available in the current context and suggests an alternatives when a sufficiently similar match exists.
Name matching is handled by a dedicated NameSuggester using Apache Commons Text’s Jaro-Winkler similarity.

Examples

image image image

Related Issue

None.

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring

Checklist

  • Added/updated tests
  • mvn test passes locally
  • Updated docs/README if behavior or API changed

@rcosta358 rcosta358 self-assigned this Aug 30, 2026
@rcosta358 rcosta358 added enhancement New feature or request error messages Related to error messages labels Aug 30, 2026

@alcides alcides left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request error messages Related to error messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants