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 typos, YAML problems, and clarify one comment #796

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hades
Copy link
Contributor

@hades hades commented Feb 24, 2025

No description provided.

@purpleidea
Copy link
Owner

wow, amazing work on all the typo fixing-- honestly, I've always been good at spelling, so I don't know how all of these crept in! I bet if you git blame they're mostly other people, right? =D

I have a WIP branch with a "spelling" test, but it always had so many false positives. If you have something better, lmk!

@purpleidea
Copy link
Owner

(first commit merged, thanks, remaining two pending)

@hades
Copy link
Contributor Author

hades commented Feb 24, 2025

If you have something better, lmk!

The spelling errors I fixed here were found by codespell[1]. Unlike spellcheckers for normal text, it uses a blacklist approach, so it looks for common typos and misspellings, which generates less false positives.

I plan to include it in the pre-commit checks.

[1] https://github.com/codespell-project/codespell/tree/main

@purpleidea
Copy link
Owner

pre-commit checks

Can we have it so pre-commit checks are actually shell files to run from test/test-* so that we can have the same scripts be usable in our test suite if we want them there too?

(I'd like to avoid duplicating the logic in two places.)

I also have a test-spelling.sh stub which I never pushed which we can add codespell to if you like?

@hades
Copy link
Contributor Author

hades commented Feb 24, 2025

Can we have it so pre-commit checks are actually shell files to run from test/test-* so that we can have the same scripts be usable in our test suite if we want them there too?

(I'd like to avoid duplicating the logic in two places.)

Yes, I would like to avoid duplication too. However, I propose to go the other way, and migrate some of the existing test-*.sh (e.g. gofmt, yamlfmt, mclfmt, basically anything based on find_files/bad_files pattern) to pre-commit and then have GitHub CI run pre-commit on pull requests too. This way the logic will be in one place, the pre-commit config.

I also have a test-spelling.sh stub which I never pushed which we can add codespell to if you like?

Is there anything there that you want to keep other than spelling? If yes, I'll see if I can reimplement it with pre-commit.

@purpleidea
Copy link
Owner

migrate some of the existing test-*.sh to pre-commit

Actually I do not want this, sorry. I do not want to add a python dependency to this project. We'd like to be as close as possible to bash+golang as we can, and furthermore, keeping everything as a ./test.sh runner lets us easily move this to additional CI's. Similarly, pre-commit could be seen as a "CI" and so any logic you want in there, please make sure it's first in test/*

@purpleidea
Copy link
Owner

(To be clear, this doesn't mean you can't use pre-commit or add the config file for it of course, but we aren't going to depend on it for our test suite or add specific things that only work there.)

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.

2 participants