Skip to content

"Interaction" with pre-commit: ideally should skip the skipped files. #3196

@yarikoptic

Description

@yarikoptic

I ran into it before but forgot to report, and now didn't find open issue. Currently inspired by PrefectHQ/prefect#10893 where running codespell in CLI directly results in no hits, but pre-commit reports:

codespell................................................................Failed
- hook id: codespell
- exit code: 65

.github/ISSUE_TEMPLATE/5_maintenance_ticket.yaml:1: maintenence ==> maintenance
.github/workflows/python-tests.yaml:62: automaticlly ==> automatically
.github/workflows/python-tests.yaml:246: automaticlly ==> automatically
.github/ISSUE_TEMPLATE/2_ui_bug_report.yaml:69: Browers ==> Browsers
ui/package-lock.json:2999: OT ==> TO, OF, OR, NOT
ui/package-lock.json:8411: OT ==> TO, OF, OR, NOT
src/prefect/_vendor/fastapi/utils.py:131: unecessary ==> unnecessary

Problems:

  1. If I define files to skip in codespell configuration (e.g. in .codespellrc), those files will not be skipped in pre-commit run --all since ( I guess) pre-commit would pass those paths explicitly to codespell invocation and thus it would not account for skip.

  2. Also, complimentary, may be codespell should check in .dotdirs like .github etc?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions