microsoft / cppwinrt

C++/WinRT
MIT License
1.61k stars 232 forks source link

Add check-spelling #1413

Closed jsoref closed 3 months ago

jsoref commented 3 months ago

This adds https://github.com/marketplace/actions/check-spelling?version=v0.0.22

It's configured to try to use SARIF reporting (which is much prettier than the alternatives). The github/codeql-action kinda sorta needs security-events: write -- which isn't ideal, but eventually it won't and it should only be a concern if you had other workflows that also used security-events (which I don't think you do at this time).

Each of the with items is tunable -- e.g., if you don't want it to check the spelling of file names you can remove that flag.

The advice.md file is included in the GitHub job summary and you can tune it to fit the needs of your repository users.

Often I'll watch a repository for a while to make sure things go smoothly.

If you have questions about things, now or in the future, just tag me. I'm generally fairly responsive.

kennykerr commented 3 months ago

Sweet, I think I need to enable the action before the workflow will run. I've done that now.

jsoref commented 3 months ago

I've done a git commit --amend --no-edit and git push jsoref HEAD --force-with-lease, but it won't actually do what you're expecting (and I should have been able to tell you that in advance, but I'm still recovering...).

Now is a good time to explain an important detail about this workflow's configuration...

At the end of the day, it will run according to two triggers:

on:
  push:
  pull_request_target:

Sorry for the long-winded message and lack of a templated thing. At some point I will probably write this up so I can just either point people to it or copy&paste. But this was the first technical task of my day...

kennykerr commented 3 months ago

Thanks, this may all be a bit overkill for spell checking but I've certainly learned a lot!