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

Add codespell: config + workflow to detect new typos. Get some typos fixed #9234

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

yarikoptic
Copy link
Contributor

Description

https://github.com/codespell-project/codespell is great at fixing known typos. I am proposing codespell to any project I get to look "inside" at

@cclauss
Copy link
Contributor

cclauss commented Jan 24, 2024

Please rebase because pre-commit should be fixed now.

Also,

@yarikoptic yarikoptic force-pushed the enh-codespell branch 3 times, most recently from 0b28a9f to 726d43d Compare January 25, 2024 02:30
.codespellrc Outdated
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
skip = .git,*.svg,*.css,*.min.*,*-min.js,.codespellrc,locale,static,kickstarter-announcement.md
check-hidden = true
Copy link
Contributor

Choose a reason for hiding this comment

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

check-hidden is not a good idea on a GitHub repo because it will spellcheck all our dependencies and a bunch of other files that we don't have the desire or ability to modify. If we remove that option then we can simplify to:
codespell --ignore-words-list=fo,malcom,ser --skip="*/kickstarter-announcement.md,*.js,*.map,*.po"

Also, this project already has a setup.cfg file so perhaps it would be better to put this configuration there.
This has the added advantage that it will be automatically migrated to pyproject.toml by tools like ini2toml.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • moved configuration to setup.cfg (yet to adjust my https://github.com/yarikoptic/improveit/blob/main/codespellit to do so automagically -- it only considers pyproject.toml ATM)
  • minimized to your recommendation/liking
  • dropped added workflow entirely -- with pre-commit workflow you don't need it separately (checked that pre-commit workflow did pickup newly added typo)

@yarikoptic yarikoptic marked this pull request as draft January 26, 2024 14:07
=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w -i 3 -C 2 ./docs/community/release-notes.md",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
Copy link
Contributor

@cclauss cclauss left a comment

Choose a reason for hiding this comment

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

Nice!!

@cclauss
Copy link
Contributor

cclauss commented Jan 26, 2024

Is this still a Draft or Ready to be reviewed?

@yarikoptic yarikoptic marked this pull request as ready for review January 26, 2024 16:48
@yarikoptic
Copy link
Contributor Author

sorry, forgot to bring it back. Ready now

@auvipy auvipy merged commit fb03dd9 into encode:master Feb 28, 2024
8 checks passed
@auvipy
Copy link
Member

auvipy commented Feb 28, 2024

thanks

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.

None yet

3 participants