-
Notifications
You must be signed in to change notification settings - Fork 131
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
Configuration of cargo-spellcheck #832
Conversation
@@ -0,0 +1,88 @@ | |||
90 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, where'd you get this list from?
Also, what's with the /<letter>
at the end of certain words?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kinda...it is called Hunspell
and by that letters it is allowed to specify kind of dictionary like "en_US". Paste from the documentation:
If the .dic files contains incorrect rules for a word, then add the word with the correct rules to .dic_delta. For example, if en_US.dic contains the entry raccoon/M, but the rule should be /MS, then add raccoon/MS to en_US.dic_delta. Rules for entries in .dic_delta override the rules for entries in .dic.
Source: https://www.chromium.org/developers/how-tos/editing-the-spell-checking-dictionaries
What is the source of the list? Well, long story short, around 2 months ago I was thinking that the task will take me ~1h and started to do it, but it was not so simple and was needed to leave it, but I to follow and look at Parity's repositories and I found that PR: https://github.com/paritytech/polkadot/pull/1841/files and my dream is to do at least one merge/ed PR and when I saw the PR I immediately made my PR.
That is it, that's the story.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kinda...it is called
Hunspell
and by that letters it is allowed to specify kind of dictionary like "en_US". Paste from the documentation:If the .dic files contains incorrect rules for a word, then add the word with the correct rules to .dic_delta. For example, if en_US.dic contains the entry raccoon/M, but the rule should be /MS, then add raccoon/MS to en_US.dic_delta. Rules for entries in .dic_delta override the rules for entries in .dic.
Source: https://www.chromium.org/developers/how-tos/editing-the-spell-checking-dictionaries
I still don't fully get it, but good to know there's a source for the strangeness 😅
What is the source of the list? Well, long story short, around 2 months ago I was thinking that the task will take me ~1h and started to do it, but it was not so simple and was needed to leave it, but I to follow and look at Parity's repositories and I found that PR: https://github.com/paritytech/polkadot/pull/1841/files and my dream is to do at least one merge/ed PR and when I saw the PR I immediately made my PR.
That is it, that's the story.
Haha, sounds good! Keep in mind that you will need to add some "bridge" specific words in there though (e.g our test networks Rialto and Millau). I'm not sure what other false positives you'll get, but I imagine there'll be a few.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spellcheck.mp4
@HCastano I wanted to check output from the commands like in recording but I got empty output, I have missed something all it works like supposed to work?
@TomaszWaszczyk Hey, any updates here? |
I have added specific to the bridge words, within 36h will check if occurs some false positives and if needed commit. Is it a good direction? |
Looks good to me, can you add a job on CI to make sure it's being checked? |
Sure, will do that within coming days. |
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
I have changed a way how to install In case of any hints how can I improve the PR let me know, please ;-) PS. Feel free to suggest me next issue that you know will learn me more about the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I'm kind of suspicious that it didn't fail on anything - does it mean that our entire documentation is typo-free? I find it quite hard to believe, but 🤷 🎉.
PS. Feel free to suggest me next issue that you know will learn me more about the project.
I've recently created a separate milestone for small improvements like that, feel free to take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty suspicious of the fact that we got no typos or anything of the sort.
It doesn't look like we've installed an en_US
dictionary on the build machine. I figured hunspell
would come with a default, but maybe I'm mistaken.
@drahnr Can you confirm if we need to install an external dictionary?
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Depends on your configuration and the quality of your list, I'll take a peek into this at some point today :)
This should yield an error for sure if there is no dictionary found.
Currently you need an external dictionary. This is going to change with the next release ( |
It's very unlikely that |
This is a bug in |
Builtin dictionary and affix files are on their way: drahnr/cargo-spellcheck#168 should be ready at some point later today with Edit: released |
.github/workflows/lint.yml
Outdated
uses: actions-rs/cargo@master | ||
with: | ||
command: spellcheck | ||
args: check -m 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding -vv
to have some additional output in CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have looked at the docs and there is written:
To increase verbosity add
-v
(multiple) to increase verbosity.
That is why I added -v
, correct me please if I am wrong with that one -v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-q
nothing
-
error
-v
warn
-vv
info
-vvv
debug
and any more than that will probably kill the output buffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a brief peek into the results and they look good to me. There are a bunch of |
…ease verbosity. - enable debug mode
This reverts commit c2d56b2.
Closing this in favour of #924. |
My second try to configure the tool ;-)