Skip to content

Commit

Permalink
docs: Update pre-commit hook example
Browse files Browse the repository at this point in the history
Update syntax of pre-commit hook docs to work with newer pre-commit versions.

Closes #551, #553
  • Loading branch information
andrewimeson authored Mar 22, 2023
1 parent 15f8204 commit 8aaa226
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ Integration with other software
Integration with pre-commit
---------------------------

You can integrate yamllint in `pre-commit <http://pre-commit.com/>`_ tool.
You can integrate yamllint in the `pre-commit <https://pre-commit.com/>`_ tool.
Here is an example, to add in your .pre-commit-config.yaml

.. code:: yaml
---
# Update the rev variable with the release version that you want, from the yamllint repo
# You can pass your custom .yamllint with args attribute.
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.17.0
hooks:
- id: yamllint
args: [-c=/path/to/.yamllint]
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
hooks:
- id: yamllint
args: [--strict, -c=/path/to/.yamllint]
Integration with GitHub Actions
-------------------------------
Expand Down

0 comments on commit 8aaa226

Please sign in to comment.