Skip to content
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

Merged
merged 18 commits into from
Jul 30, 2024

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Nov 15, 2023


Changes:

Microsoft Reviewers: Open in CodeFlow

@jsoref jsoref requested a review from a team as a code owner November 15, 2023 17:27
Comment on lines 91 to 96
# Because it doesn't handle argument -Words well
^tools/CorrelationTestbed/.*\.ps1$
^tools/COMTrace/ComTrace.wprp$
Copy link
Contributor Author

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

Comment on lines 423 to 476
TOperation
TOptions
TProgress
TResult
TReturn
trimstart
TState
TStatus
Copy link
Contributor Author

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.

.github/actions/spelling/patterns.txt Outdated Show resolved Hide resolved
.github/workflows/spelling3.yml Outdated Show resolved Hide resolved
Comment on lines -65 to +86
if: "contains(github.event_name, 'pull_request') || github.event_name == 'push'"
if: ${{ contains(github.event_name, 'pull_request') || github.event_name == 'push' }}
Copy link
Contributor Author

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.

.github/workflows/spelling3.yml Outdated Show resolved Hide resolved
.github/workflows/spelling3.yml Outdated Show resolved Hide resolved
extra_dictionaries:
cspell:cpp/src/compiler-msvc.txt
cspell:cpp/src/cpp.txt
Copy link
Contributor Author

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.

Copy link
Member

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"

.github/workflows/spelling3.yml Outdated Show resolved Hide resolved
Comment on lines 154 to 173
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/check-spelling@v0.0.22
with:
experimental_apply_changes_via_bot: 1
checkout: true
ssh_key: "${{ secrets.CHECK_SPELLING }}"
Copy link
Contributor Author

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.

@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch from 0a4ca44 to 64d4149 Compare November 15, 2023 17:42
florelis
florelis previously approved these changes Nov 15, 2023
.github/actions/spelling/candidate.patterns Outdated Show resolved Hide resolved
.github/actions/spelling/excludes.txt Outdated Show resolved Hide resolved
.github/actions/spelling/excludes.txt Outdated Show resolved Hide resolved
.github/actions/spelling/patterns.txt Outdated Show resolved Hide resolved
.github/actions/spelling/expect.txt Outdated Show resolved Hide resolved
extra_dictionaries:
cspell:cpp/src/compiler-msvc.txt
cspell:cpp/src/cpp.txt
Copy link
Member

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"

.github/workflows/spelling3.yml Outdated Show resolved Hide resolved
Copy link
Member

@JohnMcPMS JohnMcPMS left a 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.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Author-Feedback Issue needs attention from issue or PR author Needs-Attention Issue needs attention from Microsoft and removed Needs-Author-Feedback Issue needs attention from issue or PR author labels Dec 12, 2023
@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch from c1fe3a1 to d776ec2 Compare December 13, 2023 04:30
@jsoref jsoref requested a review from JohnMcPMS December 13, 2023 06:20
@denelon
Copy link
Contributor

denelon commented Jan 6, 2024

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?

@jsoref
Copy link
Contributor Author

jsoref commented Jan 6, 2024

@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:

<!--
template: check-spelling
-->

So that it's only seen by mail filters and not by humans.

@mominshaikhdevs
Copy link

what's the latest update on this?

jsoref added 2 commits July 11, 2024 15:07
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch 2 times, most recently from 6236f70 to 051f9ba Compare July 12, 2024 03:57
jsoref added 10 commits July 11, 2024 23:59
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>

spelling: contoso

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>
jsoref added 5 commits July 12, 2024 00:00
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>
@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch from 051f9ba to 7a6055b Compare July 12, 2024 04:00
@@ -23,3 +25,6 @@ https://www.regexplanet.com/advanced/perl/) yours before committing to verify it
Note that patterns can't match multiline strings.

</details>
<!--
template: check-spelling
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denelon I hope this meets your needs, but you're welcome to change it to some other pattern.

@@ -21,7 +21,7 @@ Installers:
Language: /en-US
Custom: /s
- Arch: x64
Url: https://contosa.net/publiccontainer/contosainstaller64.exe
Url: https://contoso.com/publiccontainer/contosoinstaller64.exe
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd been ignoring this for a while... contoso.com is microsoft's domain. contosa is a typo of contoso, and contosa.net isn't registered.

If this needs to not be contoso.com, it should be an example.com or some other microsoft controlled domain...

@jsoref
Copy link
Contributor Author

jsoref commented Jul 16, 2024

Hmm.. I guess I need to rebase -- I was hoping @denelon or @JohnMcPMS would have reviewed it since...

At this point, I'm close to releasing the next version...

@denelon
Copy link
Contributor

denelon commented Jul 16, 2024

Sorry about that! We've been super busy with some internal work and haven't been as good as we should have been about reviewing external PRs. Do you want me to get someone to review this or hold off until the next release?

@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch from 7a6055b to 8a51af7 Compare July 17, 2024 15:17
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
@jsoref jsoref force-pushed the check-spelling-v0.0.22 branch from 8a51af7 to d92289f Compare July 17, 2024 15:31
Comment on lines -92 to -98
comment-push:
name: Report (Push)
# If your workflow isn't running on push, you can remove this job
runs-on: ubuntu-latest
needs: spelling
permissions:
contents: write
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm removing this job from the flow.

In the long term, I'm nudging people to rely on the step summary (which happens automatically) over adding comments, but in the near term, people can rely on comments when they make a pull request.

@JohnMcPMS
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JohnMcPMS
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JohnMcPMS JohnMcPMS merged commit 6df6ded into microsoft:master Jul 30, 2024
8 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Attention Issue needs attention from Microsoft label Jul 30, 2024
@jsoref jsoref deleted the check-spelling-v0.0.22 branch July 31, 2024 11:20
@jsoref
Copy link
Contributor Author

jsoref commented Jul 31, 2024

@JohnMcPMS could you add check-spelling/actions-checkout@* to the exemptions list? It isn't used at this time, but because of the logic, the runtime doesn't know.

Check Spelling
Bad request - check-spelling/actions-checkout@v4 is not allowed to be used in microsoft/winget-cli. Actions in this workflow must be: within a repository that belongs to your Enterprise account, created by GitHub, or matching the following: check-spelling/check-spelling@*, check-spelling/checkout-merge@*, craigloewen-msft/gitgudsimilarissues@*.

@denelon
Copy link
Contributor

denelon commented Jul 31, 2024

@jsoref, I just added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants