lib: add suggestions on invalid subsystems#58
Open
richardlau wants to merge 1 commit intonodejs:mainfrom
Open
Conversation
joyeecheung
reviewed
Apr 16, 2019
When an invalid subsystem is encountered, attempt to make a suggestion based on the nearest match (if any) from the valid subsystems.
aa3a0f2 to
28b7f63
Compare
Member
Author
Updated. Now looks like this: ✔ 0:0 skipping fixes-url fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✖ 0:0 Invalid subsystem: "error" subsystem
Did you mean "errors"?
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length(Not sure why GitHub isn't aligning the |
Member
Author
lholmquist
reviewed
Jul 23, 2019
| if (!~subs.indexOf(sub)) { | ||
| failed = true | ||
| let suggestion = '' | ||
| const suggestions = new FuzzySet(subs).get(sub) |
Contributor
There was a problem hiding this comment.
A small suggestion. It might be better to create the FuzzySet once instead of creating it for every iteration of the for loop.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

When an invalid subsystem is encountered, attempt to make a suggestion
based on the nearest match (if any) from the valid subsystems.
Example: