feat: add pre-commit support (#543)
Co-authored-by: Douglas Thor <doug.thor@gmail.com>
This commit is contained in:
parent
f655603614
commit
106feff9ba
|
@ -23,3 +23,4 @@ LINT([0-9]{4})
|
|||
SCM
|
||||
bools
|
||||
Check[A-Z].+
|
||||
(P|p)re-(C|c)ommit
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
- id: ansible-later
|
||||
name: ansible-later
|
||||
description: Run ansible-later, a best-practice scanner for Ansible.
|
||||
entry: ansible-later
|
||||
language: python
|
||||
pass_filenames: False
|
||||
always_run: True
|
||||
additional_dependencies:
|
||||
- .[ansible-core]
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
title: Pre-Commit setup
|
||||
---
|
||||
|
||||
To use `ansible-later` 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-later
|
||||
# change ref to the latest release from https://github.com/thegeeklab/ansible-later/releases
|
||||
rev: v3.0.2
|
||||
hooks:
|
||||
- id: ansible-later
|
||||
{{< /highlight >}}
|
||||
|
||||
<!-- spellchecker-enable -->
|
||||
<!-- markdownlint-restore -->
|
||||
<!-- prettier-ignore-end -->
|
Loading…
Reference in New Issue