feat: add pre-commit support (#449)
This commit is contained in:
parent
ffe18075c5
commit
a50242e345
|
@ -9,3 +9,4 @@ xoxys
|
||||||
ansible-.+
|
ansible-.+
|
||||||
toc
|
toc
|
||||||
GPL-3.0
|
GPL-3.0
|
||||||
|
(P|p)re-(C|c)ommit
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
- id: ansible-doctor
|
||||||
|
name: ansible-doctor
|
||||||
|
description: Create annotation based documentation for your Ansible roles.
|
||||||
|
entry: ansible-doctor -f
|
||||||
|
language: python
|
||||||
|
pass_filenames: False
|
||||||
|
always_run: True
|
|
@ -100,3 +100,23 @@ ANSIBLE_DOCTOR_CUSTOM_HEADER=
|
||||||
ANSIBLE_DOCTOR_EXCLUDE_FILES=
|
ANSIBLE_DOCTOR_EXCLUDE_FILES=
|
||||||
ANSIBLE_DOCTOR_EXCLUDE_FILES=molecule/,files/**/*.py
|
ANSIBLE_DOCTOR_EXCLUDE_FILES=molecule/,files/**/*.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Pre-Commit setup
|
||||||
|
|
||||||
|
To use _ansible-doctor_ with the [pre-commit](https://pre-commit.com/) framework, add the following to the `.pre-commit-config.yaml` file in your local repository.
|
||||||
|
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
|
<!-- spellchecker-disable -->
|
||||||
|
|
||||||
|
{{< highlight yaml "linenos=table" >}}
|
||||||
|
- repo: https://github.com/thegeeklab/ansible-doctor
|
||||||
|
# change ref to the latest release from https://github.com/thegeeklab/ansible-doctor/releases
|
||||||
|
rev: v1.4.8
|
||||||
|
hooks:
|
||||||
|
- id: ansible-doctor
|
||||||
|
{{< /highlight >}}
|
||||||
|
|
||||||
|
<!-- spellchecker-enable -->
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
Loading…
Reference in New Issue