-
-
Notifications
You must be signed in to change notification settings - Fork 283
feat(linter): add codespell linter #6256
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
base: main
Are you sure you want to change the base?
Conversation
7acabdc to
3f7cc67
Compare
3f7cc67 to
475b23f
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. If you think this pull request should stay open, please remove the |
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.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| @@ -0,0 +1,2 @@ | |||
| abandonded Dockefile | |||
| abberivated acadamy | |||
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.
Bug: Autofix Test File: Misspellings Remain Unfixed
The spell_fix_1.md test file contains the same misspellings as spell_bad_1.md, but should contain the corrected version. Since codespell has cli_lint_fix_arg_name: --write-changes defined, autofix tests expect this file to show the corrected output after applying fixes. It should contain "abandoned Dockerfile\nabbreviated academy" to match the corrections in spell_good_1.md.
|
Can the conflicts be solved? |
475b23f to
d16a1ac
Compare
| - .jsonc | ||
| - .json5 | ||
| - .yaml | ||
| - .yml |
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.
Bug: Restrictive file extensions prevent checking code
The file_extensions list only includes documentation and data files, preventing codespell from checking source code files (like .py, .js, etc.) as intended by its description and purpose. Consider adding * or a broader list of code extensions to ensure it runs on the codebase.
Add the codespell linter which uses a dictionary of common misspellings and ignores unknown words. Signed-off-by: Roger Luethi <roger.luethi@bisdn.de>
d16a1ac to
d4e36a0
Compare
| # renovate: datasource=pypi depName=codespell | ||
| ARG PIP_CODESPELL_VERSION=2.4.1 | ||
| pip: | ||
| - codespell==${PIP_CODESPELL_VERSION} |
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.
Bug: Missing lint_all_other_linters_files property for codespell
The codespell linter definition is missing the lint_all_other_linters_files property. Since the SPELL descriptor sets lint_all_other_linters_files: true at the descriptor level, codespell will inherit this value and lint all files from all other linters instead of only the specified file extensions. All other spell linters in this descriptor (proselint, vale, and lychee) explicitly set lint_all_other_linters_files: false to override the descriptor-level setting. This causes codespell to operate on an unexpectedly large set of files beyond its intended scope.
|
@nvuillam seems ready |
Add the codespell linter which uses a dictionary of common misspellings and ignores unknown words.
This is an updated version of #4143 which was closed as stale and could not be reopened by the maintainer.
Fixes #6255
Proposed Changes
Add the codespell linter which uses a dictionary of common misspellings and ignores unknown words.
Readiness Checklist
Author/Contributor
Reviewing Maintainer
breakingif this is a large fundamental changeautomation,bug,documentation,enhancement,infrastructure, orperformanceNote
Integrates the codespell misspelling checker across core, flavors, and docs, with Docker installs, configuration, and tests.
codespell(SPELL_CODESPELL) with config (.codespellrc), examples, and metadata inspell.megalinter-descriptor.yml.codespell(PIP_CODESPELL_VERSION=2.4.1) in mainDockerfileand all relevant flavor images; updatePATHentries.linters/spell_codespell/Dockerfile.SPELL_CODESPELLto descriptors lists (all_flavors.json, flavorflavor.jsonfiles), linters matrix, versions, links/previews, and CLI help.SPELL_CODESPELL..mega-linter.ymlto disable errors forSPELL_CODESPELL..cspell.jsondictionary withcodespellterms.SPELL_CODESPELLtodocs/standalone-linters.md.CHANGELOG.md.spell_codespell_test.pyand sample test files under.automation/test/spell_codespell/.Written by Cursor Bugbot for commit d4e36a0. This will update automatically on new commits. Configure here.