mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
yamllint: Run yaml linter only on modified files in pre-commit.
With the parameter `args: ['.']`, yamllint would run over every file during pre-commit, including those not being commited, and it would allow for false negatives, not allowing a commit, even if commited yaml files had no issues, but another file, not par of the commit, had. By changing the yamllint parameter to `files: \.(yaml|yml)$` it will only check files being commited, preventing false negatives, and allowing for faster commits.
This commit is contained in:
@@ -12,7 +12,7 @@ repos:
|
||||
rev: v1.25.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args: ['.']
|
||||
files: \.(yaml|yml)$
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.8.4
|
||||
hooks:
|
||||
|
||||
Reference in New Issue
Block a user