mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
chore: improve lefthook configuration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
!/.vscode/extensions.json
|
||||
!/.vscode/settings.json
|
||||
|
||||
/.lefthook/
|
||||
/.lefthook-local.yml
|
||||
|
||||
/node_modules/
|
||||
|
||||
@@ -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
|
||||
|
||||
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@@ -58,7 +58,7 @@
|
||||
"[yaml]": {
|
||||
"editor.rulers": [
|
||||
120
|
||||
],
|
||||
]
|
||||
},
|
||||
|
||||
"cSpell.language": "en,en-GB",
|
||||
|
||||
9
Makefile
9
Makefile
@@ -2,13 +2,14 @@
|
||||
|
||||
override venv ?= ${shell git rev-parse --show-toplevel}/.venv
|
||||
|
||||
create-venv: override python_version ?= 3
|
||||
create-venv: ${shell which 'python${python_version}'}
|
||||
@python${python_version} -m 'venv' '${venv}'
|
||||
create-venv: override python_version ?= 3.11
|
||||
create-venv: override python_executable ?= ${shell which --tty-only --show-dot --show-tilde 'python${python_version}'}
|
||||
create-venv: ${python_executable}
|
||||
@${python_executable} -m 'venv' '${venv}'
|
||||
@${venv}/bin/pip --require-virtualenv install -r 'requirements.txt'
|
||||
|
||||
recreate-venv:
|
||||
@rm -r '${venv}'
|
||||
@rm -rf '${venv}'
|
||||
@${MAKE} create-venv
|
||||
|
||||
update-venv: ${venv}/bin/pip
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
// Zed settings
|
||||
//
|
||||
// ** This file extension must be 'json', not 'jsonc'. **
|
||||
// ** Only named with .jsonc to skip validation in the repo.
|
||||
//
|
||||
// For information on how to configure Zed, see the Zed
|
||||
// documentation: https://zed.dev/docs/configuring-zed
|
||||
// documentation: https://zed.dev/docs/configuring-zed.
|
||||
//
|
||||
// To see all of Zed's default settings without changing your
|
||||
// custom settings, run the `open default settings` command
|
||||
@@ -1,4 +1,5 @@
|
||||
ansible==9.5.1
|
||||
ansible-lint==24.2.2
|
||||
ansible==10.1.0
|
||||
ansible-lint==24.7.0
|
||||
click==8.1.7
|
||||
pyinilint==0.17
|
||||
yq==3.4.3
|
||||
|
||||
Reference in New Issue
Block a user