Skip to content

Commit f8bbd64

Browse files
committed
pre-commit: fix file filtering
Without `always_run: False` the ansible-lint starts every single time, regardless of what is being committed. It wastes at least 2 seconds every time.
1 parent 9cf4e53 commit f8bbd64

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,12 @@ repos:
5353
hooks:
5454
- id: ansible-lint
5555
entry: "sh -c 'cd ansible && python3 -m ansiblelint -v --force-color'"
56+
verbose: true
57+
always_run: false
5658
additional_dependencies:
5759
- ansible
5860
- jmespath
59-
files: '^ansible/.*$'
61+
files: '^ansible/.*'
6062
- repo: https://github.com/python-poetry/poetry
6163
rev: '2.1.3'
6264
hooks:

0 commit comments

Comments
 (0)