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
[Trivial] Add Spell Checker rules to '.editorconfig' #10311
Conversation
I like this PR. There is also https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022 (maybe worth adding to your OP). Personally, I would try to add |
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.
cACK. The severity of the spelling issue is not an error, but only info. We should keep errors for code problems. Add spelling_exclusion_path so we together can build a project-wide dictionary.
… consider to be correctly spelled
Done.
Done. |
I wonder why |
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.
LGTM and it seems to work
I would add segwit
& Segwit
& Prevout
to the dictionary too.
.editorconfig
Outdated
spelling_languages = en-us | ||
spelling_checkable_types = strings,identifiers,comments | ||
spelling_error_severity = information | ||
spelling_exclusion_path = .\exclusion.dic |
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.
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 tried this but it didn't work.
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.
Wild guess: https://git-scm.com/docs/gitattributes#_marking_files_as_binary .. use .gitattributes
to mark .dic
as non-binary file. But maybe not worth the effort, I'm not sure. I'm not sure it will fix the issue.
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 worth the effort otherwise we won't see the changes in the dictionary file. @yahiheb pls check this to solve the problem https://stackoverflow.com/questions/6855712/why-does-git-treat-this-text-file-as-a-binary-file
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.
So the issue here is that exclusion.dic
has UTF-16 BOM encoding. Here https://github.com/zkSNACKs/WalletWasabi/pull/10410/files#diff-85ffb40cdc41bba97c28132b5f729d5fdfeb4f61b919eb8fcf35c0747a6d34f9 you can see that if the file is in UTF-8, it's OK. But the question is whether the spell checker should then work. They say it should but for me, it works with Visual Studio preview but not Visual Studio (stable).
So there are options:
- Wait for the next VS release.
- Merge as is and change after the next VS is released.
Try UTF-16 without BOM.
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.
Ok, so either wait or merge as-is and change after MSVS 17.6 is released (might take weeks, not more than 2 months I guess).
I would just merge it, the feature is useful.
What's up with this @yahiheb ? |
Done, but there are a lot of words to add in another PR.
It is ready. |
It is not good until we cannot see the words on GitHub. The dic will be enormous. |
Hm, I don't think it will be that bad. I would expect that like 50 entries will cover 80% of all spell-checker warnings. Now let's hope this will age well. Haha. |
.editorconfig
Outdated
@@ -289,3 +289,9 @@ dotnet_diagnostic.CA1827.severity = warning | |||
|
|||
# CA1822: This complains to make functions static. Static is evil. Don't let it complain. | |||
dotnet_diagnostic.CA1822.severity = none | |||
|
|||
# Spell Checker rules |
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.
nit: I would put the spell checker rules after L27. Nobody will scroll down here because it's reasonable to think that only diagnostics follow.
Feel free to ignore though.
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.
Done.
As @kiminuo has mentioned here #10311 (comment), the feature is useful and I would merge it now, and change after MSVS 17.6 is released. |
With one condition: whenever there is a change in |
ACK |
Visual Studio 2022 version 17.5 has now a new feature called
Spell Checker
that can help fix typos for Visual Studio users.https://learn.microsoft.com/en-us/visualstudio/ide/text-spell-checker?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes#17.5.0
https://devblogs.microsoft.com/visualstudio/visual-studio-spell-checker-preview-now-available/