mirror of
https://github.com/thegeeklab/ansible-doctor.git
synced 2024-11-19 11:40:39 +00:00
feat: add pre-commit support (#449)
This commit is contained in:
parent
ffe18075c5
commit
a50242e345
@ -9,3 +9,4 @@ xoxys
|
||||
ansible-.+
|
||||
toc
|
||||
GPL-3.0
|
||||
(P|p)re-(C|c)ommit
|
||||
|
8
.pre-commit-hooks.yaml
Normal file
8
.pre-commit-hooks.yaml
Normal file
@ -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=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
Block a user