refactor(management): start the move to lefthook

This commit is contained in:
Michele Cereda
2024-02-17 18:36:58 +01:00
parent 497ce3c772
commit 7ff56de4c0
3 changed files with 34 additions and 6 deletions

16
.gitignore vendored
View File

@@ -1,8 +1,16 @@
.DS_Store .DS_Store
.vscode/* /.vscode/*
!.vscode/extensions.json !/.vscode/extensions.json
!.vscode/settings.json !/.vscode/settings.json
/.lefthook-local.yml
/node_modules/
/package.json
/package-lock.json
__pycache__/
.obsidian/ .obsidian/
@@ -15,5 +23,3 @@
*.tfstate.backup *.tfstate.backup
.pulumi/ .pulumi/
__pycache__/

21
.lefthook.yml Normal file
View File

@@ -0,0 +1,21 @@
no_tty: true
lint:
parallel: true
commands:
yamllint: &yamllint
glob: "*.{yaml,yml}"
run: >-
docker run --rm -v "$PWD:/code" 'registry.gitlab.com/pipeline-components/yamllint:latest'
yamllint '.'
pre-commit:
parallel: true
commands:
yamllint:
<<: *yamllint
# commit-msg:
# commands:
# commitlint:
# run: commitlint --edit

View File

@@ -6,5 +6,6 @@ extends: default
rules: rules:
line-length: line-length:
allow-non-breakable-inline-mappings: true level: warning
max: 120 max: 120
allow-non-breakable-inline-mappings: true