-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Upgrade to check-spelling v0.0.22 #3896
base: master
Are you sure you want to change the base?
Conversation
# Because it doesn't handle argument -Words well | ||
^tools/CorrelationTestbed/.*\.ps1$ | ||
^tools/COMTrace/ComTrace.wprp$ |
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.
afaict this is no longer a problem, so I'm dropping it
TOperation | ||
TOptions | ||
TProgress | ||
TResult | ||
TReturn | ||
trimstart | ||
TState | ||
TStatus |
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.
These T[A-Z]
items are handled by a pattern below.
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'" | ||
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} |
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 purely stylistic -- the vscode github integration doesn't like "..."
whereas GitHub Actions do not mind.
extra_dictionaries: | ||
cspell:cpp/src/compiler-msvc.txt | ||
cspell:cpp/src/cpp.txt |
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 dictionary is lousy (way too many typos included, similar to the win32 dictionary) -- as of v0.0.22, I 🗑️ Removed (both) Dictionaries from the suggestion list due to their poor quality.
I did look into trying to fix them, but they had so many typos that I ran out of energy trying to go over them.
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 can see why you wouldn't want to suggest the lousy dictionaries, but I'm not totally convinced it is better for us to not use them. I'm not too invested in that position, though.
The downside I see to using them is that if we happen to make the same typo, we wouldn't notice. To me that seems somewhat unlikely, and if it does happen doesn't seem like that big of a deal. I assume the dictionary would get better over time, so those typos would eventually come up.
As for upsides, it will be easier for us to manage the lists of allow/expect if we have to add less words. If we have to add lots of words, I think it's more likely we're going to make another mistake like with "uknown"
experimental_apply_changes_via_bot: ${{ github.repository_owner != 'microsoft' && 1 }} | ||
|
||
update: | ||
name: Update PR | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
actions: read | ||
runs-on: ubuntu-latest | ||
if: ${{ | ||
github.repository_owner != 'microsoft' && | ||
github.event_name == 'issue_comment' && | ||
github.event.issue.pull_request && | ||
contains(github.event.comment.body, '@check-spelling-bot apply') | ||
}} | ||
concurrency: | ||
group: spelling-update-${{ github.event.issue.number }} | ||
cancel-in-progress: false | ||
steps: | ||
- name: apply spelling updates | ||
uses: check-spelling/[email protected] | ||
with: | ||
experimental_apply_changes_via_bot: 1 | ||
checkout: true | ||
ssh_key: "${{ secrets.CHECK_SPELLING }}" |
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, as noted, very optional, but it should make it easier for others to interact with the workflow instead of having to run programs on their own computer.
0a4ca44
to
64d4149
Compare
extra_dictionaries: | ||
cspell:cpp/src/compiler-msvc.txt | ||
cspell:cpp/src/cpp.txt |
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 can see why you wouldn't want to suggest the lousy dictionaries, but I'm not totally convinced it is better for us to not use them. I'm not too invested in that position, though.
The downside I see to using them is that if we happen to make the same typo, we wouldn't notice. To me that seems somewhat unlikely, and if it does happen doesn't seem like that big of a deal. I assume the dictionary would get better over time, so those typos would eventually come up.
As for upsides, it will be easier for us to manage the lists of allow/expect if we have to add less words. If we have to add lots of words, I think it's more likely we're going to make another mistake like with "uknown"
issue_comment: | ||
types: | ||
- 'created' |
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.
What does this do? Check spelling when someone creates an 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.
When someone comments on an issue/PR it will trigger the workflow. Each job independently decides whether to do anything.
For,
spelling: |
It'll do nothing:
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }} |
For,
winget-cli/.github/workflows/spelling3.yml
Line 121 in 64d4149
comment-push: |
It'll do nothing:
winget-cli/.github/workflows/spelling3.yml
Line 128 in 64d4149
if: (success() || failure()) && needs.spelling.outputs.followup && github.event_name == 'push' |
For,
winget-cli/.github/workflows/spelling3.yml
Line 136 in 64d4149
comment-pr: |
It'll do nothing:
winget-cli/.github/workflows/spelling3.yml
Line 144 in 64d4149
if: (success() || failure()) && needs.spelling.outputs.followup && contains(github.event_name, 'pull_request') |
It will only do work here:
winget-cli/.github/workflows/spelling3.yml
Lines 153 to 165 in 64d4149
update: | |
name: Update PR | |
permissions: | |
contents: write | |
pull-requests: write | |
actions: read | |
runs-on: ubuntu-latest | |
if: ${{ | |
github.repository_owner != 'microsoft' && | |
github.event_name == 'issue_comment' && | |
github.event.issue.pull_request && | |
contains(github.event.comment.body, '@check-spelling-bot apply') | |
}} |
One of the criteria being that it isn't this repository.
If someone creates a PR within a single fork and it triggers a comment w/ a note about items that should be added to expect, the comment will include something like this from @check-spelling-bot:
64d4149
to
c1fe3a1
Compare
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.
Cannot allow write permissions.
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
Signed-off-by: Josh Soref <[email protected]>
c1fe3a1
to
d776ec2
Compare
We use a "template: foo/bar/baz" type of convention for messages from bots so it's easy to build e-mail rules to filter those out. How hard would it be to add something like that to the spellcheck messages in PRs? |
@denelon, add a line to https://github.com/microsoft/winget-cli/blob/master/.github/actions/spelling/advice.md You could even add it of the form:
So that it's only seen by mail filters and not by humans. |
Changes:
cspell:cpp/src/cpp.txt
, but you could use it orcspell:cpp/dict/cpp.txt
-- I think I missed that Add suggested dictionaries for spellchecking and remove unneeded words #3885 was adding it -- cpp suffers from the same problem as win32 -- too many misspelled words)Microsoft Reviewers: Open in CodeFlow