chore: improve lefthook configuration

This commit is contained in:
Michele Cereda
2024-07-14 00:18:07 +02:00
parent 71b64b3962
commit 9fdb9f1b0a
7 changed files with 29 additions and 23 deletions

View File

@@ -6,6 +6,14 @@ skip_output:
- skips
bootstrap:
parallel: true
commands:
commitlint:
run: npm install --save-dev '@commitlint/cli' '@commitlint/config-conventional'
venv:
run: make create-venv
debug:
parallel: true
commands:
@@ -13,14 +21,6 @@ debug:
glob: '.commitlintrc.js'
run: node_modules/.bin/commitlint --print-config
pre-flight:
parallel: true
commands:
commitlint:
run: npm install --save-dev '@commitlint/cli' '@commitlint/config-conventional'
venv:
run: make recreate-venv
lint:
parallel: true
@@ -69,7 +69,7 @@ validate:
glob: '*.{yaml,yml}'
run: >-
echo '{all_files}'
| xargs -t yq '.'
| xargs -t .venv/bin/yq '.'
pre-commit:
@@ -81,7 +81,7 @@ pre-commit:
validate-yaml:
<<: *yq
run: >-
yq '.' {staged_files} > /dev/null
.venv/bin/yq '.' {staged_files} > /dev/null
&& echo 'All YAML files are readable'
validate-ansible-playbooks:
<<: *ansible-playbook-syntax-check