mirror of
https://github.com/codespell-project/codespell.git
synced 2025-05-17 15:36:17 +08:00
README: Document how to use pre-commit (#2639)
This commit is contained in:
23
README.rst
23
README.rst
@ -154,6 +154,29 @@ config files.
|
||||
|
||||
.. _tomli: https://pypi.org/project/tomli/
|
||||
|
||||
`pre-commit <https://pre-commit.com/>`_ hook
|
||||
--------------------------------------------
|
||||
|
||||
codespell also works with `pre-commit`, using
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.2
|
||||
hooks:
|
||||
- id: codespell
|
||||
|
||||
If one configures codespell using the `pyproject.toml` file instead use:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.2
|
||||
hooks:
|
||||
- id: codespell
|
||||
additional_dependencies:
|
||||
- tomli
|
||||
|
||||
Dictionary format
|
||||
-----------------
|
||||
|
||||
|
Reference in New Issue
Block a user