Skip to content

typos does not respect pre-commits expected behaviour #1399

@hmellor

Description

@hmellor

Description

We are currently using the typos pre-commit hook in https://github.com/vllm-project/vllm. Overall it's been a good experience. However, it does not behave how a pre-commit hook should.

If a pre-commit hook makes changes it is expected that it will:

  • exit with a non-zero exit status so that pre-commit sees it as failed
  • log the changes that it has made

The pre-commit hook provided by typos does neither of these things. This makes it dangerous to use because it will silently make changes without ever informing the user what changes it actually made.

For this reason we have had to remove --write-changes. If the pre-commit hook could behave properly, we would very much like to add it back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-precommitS-triageStatus: New; needs maintainer attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions