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
CI: Add Typos workflow #7475
base: master
Are you sure you want to change the base?
CI: Add Typos workflow #7475
Conversation
permissions: | ||
contents: read |
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.
Actually the read permission is not needed for public repos.
https://github.com/szepeviktor/byte-level-care/blob/master/.github/workflows/spelling.yml#L13
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.
not sure if it is still the case, but there was a moment when if no permissions declared explicitly, some more than "read" was allowed.
explicit > implicit
|
||
[default] | ||
extend-ignore-re = [ | ||
"Sebastiaan Stok", |
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.
Instead of listing Sebastiaan explicitly, maybe we can use @author .*
and just ignore any contributor's name?
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.
$tag = new Annotation([new Line(' * @author Chuck Norris')]); |
I want to make sure Chuck Norris' name is never misspelled 🙃
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 just wouldn't want to maintain this file everytime new contributor provides new files with author that does not fit typo checker, especially there's no official way of running it locally (it's not a part of composer qa
).
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.
typos
is written in Go and is a single binary 1️⃣
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.
How many incidents will we have? One typo-like named contributor every 5 years?
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.
typos
is written in Go and is a single binary 1️⃣
So maybe we should install a binary file in a Composer hook (post-autoload-dump) and allow running it locally? composer typos
added to composer static-analysis
would allow preventing failures in CI.
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 don't know how a developer's life goes.
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.
agree, let's treat it similar as checkbashisms
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Search for misspellings | ||
uses: crate-ci/typos@master |
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.
any semver possible?
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.
No, the author of typos does not tag it as - for example - "v2", only semver tags exist but typos is improving so fast you don't want to use a semver tag.
From #7474 (comment)