From 12b4478bd5ef67cd815d4e5342490c525e14abbc Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Thu, 12 Dec 2024 12:06:56 +1000 Subject: [PATCH] Add precommit config Signed-off-by: Ryan Lerch --- .pre-commit-config.yaml | 22 ++++++++++++++++++++++ .yamllint.yaml | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..4e63c40921 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,22 @@ +--- +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + +# - repo: https://github.com/pre-commit/pre-commit-hooks +# rev: v3.2.0 +# hooks: +# - id: trailing-whitespace +# - id: end-of-file-fixer +# - id: check-yaml +# - id: check-added-large-files + +- repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + +# - repo: https://github.com/ansible/ansible-lint +# rev: v24.12.1 +# hooks: +# - id: ansible-lint diff --git a/.yamllint.yaml b/.yamllint.yaml index f740306803..b5251e97f3 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -4,9 +4,12 @@ extends: default rules: comments: min-spaces-from-content: 1 + level: error comments-indentation: false braces: max-spaces-inside: 1 + document-start: + level: error octal-values: forbid-implicit-octal: true forbid-explicit-octal: true