typos/docs/pre-commit.md
Ville Skyttä 867ee75b02 feat(pre-commit): Add binary based install
For no additional build dependencies (besides Python >= 3.6), and faster
install.

The setup.py here is a copy of the one at
https://github.com/shellcheck-py/shellcheck-py with changes kept at the
bare minimum for future diffability.

We don't support checksumming at least yet, because there's no access to
them from cargo-release at the moment.

Closes #285
2021-06-28 19:53:51 +03:00

785 B

pre-commit

To use typos with pre-commit, point its config at this repository:

repos:
  - repo: https://github.com/crate-ci/typos
    rev: v1.0.9
    hooks:
      - id: typos

The typos id installs a prebuilt executable from GitHub releases. If one does not exist for the target platform, or if one built from sources is preferred, use typos-src as the hook id instead.

Be sure to change rev to use the desired typos git tag or revision.

The hook configuration defaults to writing fixes, which triggers a pre-commit failure if any files are modified. To make it report its findings only instead, override the hook's args with something that does not contain -w/--write-changes, for example [] (meaning pass no options).