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

Add a "did you mean <>?" fix to UnknownRule #188

Closed
a-frantz opened this issue Sep 26, 2024 · 5 comments · Fixed by #334
Closed

Add a "did you mean <>?" fix to UnknownRule #188

a-frantz opened this issue Sep 26, 2024 · 5 comments · Fixed by #334
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@a-frantz
Copy link
Member

a-frantz commented Sep 26, 2024

Upgrading discussion #106 to an issue, as I consider it good-to-go.

This will almost definitely include adding a new dependency to the workspace. There are some spellcheck-type crates out there and we should pull a solution off the shelf. If you're not sure which crate to pick, drop a comment and one of us will help you find the right choice!

@a-frantz a-frantz added enhancement New feature or request good first issue Good for newcomers labels Sep 26, 2024
@bhartiRaz
Copy link

Hello, could you please assign this issue to me?

@a-frantz
Copy link
Member Author

a-frantz commented Mar 1, 2025

Hello, could you please assign this issue to me?

@bhartiRaz
I saw your comment on #202 first, and have assigned that issue to you. You should work on getting a PR addressing 202 merged before claiming another issue.

@mrswastik-robot
Copy link
Contributor

hii @a-frantz , I would love to work on this, I researched a bit and ig strsim-rs crate can be a solution in this case,,,would love to hear from you on how to proceed on from here...

@a-frantz
Copy link
Member Author

a-frantz commented Mar 2, 2025

@mrswastik-robot strsim seems like a suitable crate to me, from a brief scan! I also found symspell which might work as well if strsim turns out to not work for whatever reason.

First, I would recommend you read through our CONTRIBUTING guide if you haven't already.

When you're ready to get coding, please write a function in https://github.com/stjude-rust-labs/wdl/blob/main/wdl-lint/src/util.rs which takes an "unknown rule ID" and returns the nearest match from our set of rule IDs. Then modify https://github.com/stjude-rust-labs/wdl/blob/main/wdl-lint/src/rules/unknown_rule.rs to call that function and provide the nearest match in the fix message of the diagnostic.

@mrswastik-robot
Copy link
Contributor

hii @a-frantz, I have linked a PR, you can review it whenever you get time, I would be more than happy to make requested code changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants