Add yamllint to pre-commit
Adding a hook to pre-commit to enforce a consistent style and remove the hook check-yaml which only checks if a document is parsable and so become redundant. Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
87f667732c
commit
966d859050
@ -20,7 +20,6 @@ repos:
|
|||||||
^binaries/data/mods/_test.sim/simulation/templates.illformed.xml|
|
^binaries/data/mods/_test.sim/simulation/templates.illformed.xml|
|
||||||
^binaries/data/mods/public/maps/.*\.xml
|
^binaries/data/mods/public/maps/.*\.xml
|
||||||
)
|
)
|
||||||
- id: check-yaml
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.6.1
|
rev: v0.6.1
|
||||||
hooks:
|
hooks:
|
||||||
@ -69,3 +68,10 @@ repos:
|
|||||||
^build/premake/|
|
^build/premake/|
|
||||||
^source/third_party/
|
^source/third_party/
|
||||||
)
|
)
|
||||||
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
|
rev: v1.35.1
|
||||||
|
hooks:
|
||||||
|
- id: yamllint
|
||||||
|
args:
|
||||||
|
- --strict
|
||||||
|
exclude: ^build/premake/premake5/
|
||||||
|
8
.yamllint.yaml
Normal file
8
.yamllint.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
# https://yamllint.readthedocs.io/en/stable/index.html
|
||||||
|
extends: default
|
||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
max: 100
|
||||||
|
truthy:
|
||||||
|
check-keys: false
|
Loading…
Reference in New Issue
Block a user