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

Fix codespell not running on some files #10220

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

tetrapod00
Copy link
Contributor

Codespell was not running on some files.

The current command should check multiple directory levels, but it does not:

codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/**/*.rst

It was only checking .rst files that were one directory below the top-level directories (about, community, contributing, etc). It was not checking direct children of the top-level directories, nor was it checking children that were more deeply nested within subdirectories. This means that the entire about section was not being checked at all, since all the pages there are direct children of top-level folders.

This updated command is a crude way to check multiple levels. There should be a better way to do this, but for some reason that way is not just using a single /**/.

codespell -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/{*.rst,**/*.rst,**/**/*.rst,**/**/**/*.rst}

One uncaught typo was found with the updated command.

If you want to test out this updated codespell command, or a better alternate, try putting a typo like "1nd" in one file in each folder nesting level, then run the command (either locally or in CI).

@mhilbrunner mhilbrunner merged commit 00495c0 into godotengine:master Nov 7, 2024
1 check passed
@mhilbrunner
Copy link
Member

Good catch, thank you.

@tetrapod00 tetrapod00 deleted the codespell-fix-not-run branch November 7, 2024 23:29
@mhilbrunner
Copy link
Member

Cherrypicked to 4.3 in #10346.

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

Successfully merging this pull request may close these issues.

2 participants