mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
Faster pre-commit by running ansible-lint only when necessary.
This patch disables ansible-lint `always_run` flag, as this was making patches that did not change any YAML file take longer in the pre-commit step, as ansible-lint was executed with no parameter, thus, searching and evaluating all YAML files in the repository. With this change, if no YAML file is modified, ansible-lint is skipped.
This commit is contained in:
@@ -4,7 +4,7 @@ repos:
|
|||||||
rev: v4.3.5
|
rev: v4.3.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: ansible-lint
|
- id: ansible-lint
|
||||||
always_run: true
|
always_run: false
|
||||||
pass_filenames: true
|
pass_filenames: true
|
||||||
files: \.(yaml|yml)$
|
files: \.(yaml|yml)$
|
||||||
entry: env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ansible-lint --force-color
|
entry: env ANSIBLE_LIBRARY=./plugins/modules ANSIBLE_MODULE_UTILS=./plugins/module_utils ansible-lint --force-color
|
||||||
|
|||||||
Reference in New Issue
Block a user