-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Upgrade to check-spelling v0.0.25 #18940
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
base: main
Are you sure you want to change the base?
Conversation
@@ -32,9 +41,6 @@ index (?:[0-9a-z]{7,40},|)[0-9a-z]{7,40}\.\.[0-9a-z]{7,40} | |||
# https/http/file urls | |||
(?:\b(?:https?|ftp|file)://)[-A-Za-z0-9+&@#/*%?=~_|!:,.;]+[-A-Za-z0-9+&@#/*%=~_|] | |||
|
|||
# https/http/file urls |
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.
this item was a mismerge in a previous update...
@@ -270,12 +476,12 @@ | |||
\b(?:coarse|fine) grained\b | |||
|
|||
# Homoglyph (Cyrillic) should be `A`/`B`/`C`/`E`/`H`/`I`/`I`/`J`/`K`/`M`/`O`/`P`/`S`/`T`/`Y` | |||
# It's possible that your content is intentionally mixing Cyrllic and Latin scripts, but if it isn't, you definitely want to correct this. |
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've added testing to catch when I make typos
@@ -9,39 +18,127 @@ | |||
# Windows Resources with accelerators | |||
\b[A-Z]&[a-z]+\b(?!;) | |||
|
|||
# bug in check-spelling v0.0.24 (fixed later) |
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's fixed!
# hit-count: 5 file-count: 3 | ||
# Alternatively, if you're using check-spelling v0.0.25+, and you would like to _check_ the Non-English content for spelling errors, you can. For information on how to do so, see: | ||
# https://docs.check-spelling.dev/Feature:-Configurable-word-characters.html#unicode | ||
[a-zA-Z]*[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3}[a-zA-ZÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]*|[a-zA-Z]{3,}[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź]|[ÀÁÂÃÄÅÆČÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæčçèéêëìíîïðñòóôõöøùúûüýÿĀāŁłŃńŅņŒœŚśŠšŜŝŸŽžź][a-zA-Z]{3,} |
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.
This is worth thinking about instead of just taking unconditionally.
Samples:
author: Ítalo Masserano arkthur/italo.masserano@gmail.com |
terminal/src/renderer/gdi/paint.cpp
Line 566 in fc92131
// This is the start point of the Bézier curve. |
terminal/src/renderer/gdi/state.cpp
Line 410 in fc92131
// The wave line is drawn using a cubic Bézier curve (PolyBezier), because that happens to be cheap with GDI. |
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.
This is worth thinking about instead of just taking unconditionally.
I'm unfortunately not entirely sure what you meant. Are you referring to how we should not adopt this pattern unconditionally, or that it may have false-positives in general?
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.
Yes, I'm suggesting that it risks hiding other bugs.
I recently ran into some other repository where someone had an é
instead of a ,
, this rule would have hidden that.
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 alright with this - we can always refine
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.
For the record, the 3 files and 5 hits are:
doc/specs/#4066 - Theme-controlled color scheme switch.md
:
author: Ítalo Masserano arkthur/italo.masserano@gmail.com
src/renderer/gdi/paint.cpp
:
// This is the start point of the Bézier curve.
src/renderer/gdi/state.cpp
:
// The wave line is drawn using a cubic Bézier curve (PolyBezier), because that happens to be cheap with GDI.
// We use a Bézier curve where, if the start (a) and end (c) points are at (0,0) and (1,0), the control points are
// We can reverse the above to get back the actual amplitude of our Bézier curve. The line
I think it might make more sense to recognize Bézier
(4) and Ítalo
(1) in allow/international.txt
and drop this rule.
I should probably start adding advice to candidate.patterns
for suggested minimum thresholds.... I'll have to think about that.
Anyway, no absolute need to change this... it's just something that has come up periodically, most recently with: https://daniel.haxx.se/blog/2025/05/16/detecting-malicious-unicode/ (although the initial check-spelling/spell-check-this Cyrillic homoglyph rules predate that, and the general concern has been around since at least the introduction of punycode and IDN for DNS).
@@ -28,7 +28,7 @@ public TestResult() | |||
public List<string> Screenshots { get; private set; } | |||
public List<TestResult> RerunResults { get; private set; } | |||
} | |||
|
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.
This whitespace change was made by VSCode...
slnt | ||
stakeholders | ||
subpage | ||
sustainability | ||
sxn | ||
TLDR |
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.
This is removed by correcting the one instance to TL;DR
(see src/types/UiaTextRangeBase.cpp)
toolset | ||
tshe |
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.
This was a legacy shim from 0.0.18 ...
@@ -1,4 +1,3 @@ | |||
alice |
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.
My guess is that most of this is covered by cspell:css/css.txt
, but I didn't look too closely...
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 aside from my comment about oss
. Thanks for your works! 😊
This comment has been minimized.
This comment has been minimized.
@@ -692,7 +692,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation | |||
// - oldKeys: the key binding that we are rebinding | |||
// - newKeys: the new key chord that is being used to replace oldKeys | |||
// Return Value: | |||
// - true, if successful. False, otherwise. | |||
// - true, if successful. False; otherwise,. |
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 believe these should be rephrased to False otherwise.
; otherwise, this is somewhat of an unusual outcome
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 currently struggling with true
...False
.
A quick survey shows it happens ~9 times after Return Value:
in the repository (including here).
By contrast True
...False
happens 98 times.
// - True if ctrl was held. False otherwise.
Even true
...false
happens more often ~33 times.
Here are some examples:
// - true of light, false if dark
-- this is wrong for another reason -- it should beif
notof
🤦 -- note that this was the first one I found while looking for an example of this case
// - true if we handled the event was handled, else false.
// true iff we were able to select that tab index, false otherwise
// - showOrHide: Show is true; hide is false.
-- this is actually before// Return Value:
(I'm using VSCode's search w/ 1 line of context above&below)
// - true if partial char data is available, false otherwise
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.
Many of these are great examples for Leonard's "It's capacitity". We seriously overdocument some otherwise obvious stuff and keep doing it out of sheer inertia.
"GetIsEnabled" "Gets whether the thing is enabled" "Arguments: thing - the thing for which to report the enablement status" "Returns: true of the thing is enabled; false, otherwise,."
Now, I alone am the person to blame for using iff
.
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.
This feels like a really good argument for deleting such things.
I think I actually remember that iff
from a number of years ago...
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.
For booleans, could I propose replacing the current style with
- indicates that the thing did what it was supposed to do
// Return Value:
- // - true if we handled the event was handled, else false.
+ // ... if true, indicates the event was handled
(This is a real example, and it's a real mess handled...handled
)
Programmers should be able to understand binary negation. And the extra words here in so many of these instances seem to be a recipe for making mistakes.
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.
good lord we say "otherwise" a lot. This is also my new favorite rule. Requesting changes for the weird constructions around the find/replace of otherwise
src/terminal/input/mouseInput.cpp
Outdated
@@ -269,7 +269,7 @@ static constexpr wchar_t _encodeDefaultCoordinate(const til::CoordType sCoordina | |||
// Parameters: | |||
// - <none> | |||
// Return value: | |||
// - true, if we are tracking mouse input. False, otherwise | |||
// - true, if we are tracking mouse input. False; otherwise, |
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.
same as prior
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.
forgot to actually click request
This comment has been minimized.
This comment has been minimized.
Introduced in 6dd9c46
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@@ -8,7 +8,7 @@ using namespace winrt::TerminalApp; | |||
// - color: this color is going to be examined whether it | |||
// is light or not | |||
// Return Value: | |||
// - true of light, false if dark | |||
// - true if light, false if dark |
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.
One of the items I ran into accidentally...
// - wrapForced - Set to true is the line feed was the result of the line wrapping. if the viewport panned down. False if not. | ||
// - wrapForced - Set to true if the line feed was the result of the line wrapping. | ||
// Return Value: | ||
// - true if the viewport panned down; otherwise, false. |
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.
This change, more or less, fixes editor damage introduced in 6dd9c46
Summary of the Pull Request
References and Relevant Issues
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
PR Checklist