From e0c34e7b2f68793bbf46854b85fd750be134446d Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Fri, 3 Jan 2025 23:08:43 +0300 Subject: [PATCH] [ci] add yaml files linter to pre-commit hook but skip some rules for now (Part 1) (#6763) Co-authored-by: James Lamb --- .pre-commit-config.yaml | 5 +++++ .yamllint.yml | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .yamllint.yml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0edab8df1be6..56dfec23b088 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,6 +17,11 @@ repos: hooks: - id: end-of-file-fixer - id: trailing-whitespace + - repo: https://github.com/adrienverge/yamllint + rev: v1.35.1 + hooks: + - id: yamllint + args: ["--strict"] - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. rev: v0.8.3 diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 000000000000..baf334aa8719 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,14 @@ +# default config: https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration +extends: default + +rules: + document-start: disable + line-length: + max: 999 # temporarily increase allowed line length + truthy: + # prevent treating GitHub Workflow "on" key as boolean value + check-keys: false + + # temporarily disabled rules + indentation: disable + comments-indentation: disable