From 3fa838108e2629b98f7f4909f4115d416a2be3ed Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 11 Dec 2024 13:49:41 +0100 Subject: [PATCH] ci: add yamllint Change-Id: Ia9eb6ded1a73fb3d428d06719129de58e0ed50ef --- .github/dependabot.yml | 6 +++--- .mergify.yml | 2 +- .yamllint.yml | 22 ++++++++++++++++++++++ poe.toml | 1 + poetry.lock | 31 ++++++++++++++++++++++++++++++- pyproject.toml | 1 + 6 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 .yamllint.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 726b85b..7db04b3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,15 +1,15 @@ version: 2 updates: - package-ecosystem: pip - directory: "/" + directory: / schedule: interval: daily - time: "09:00" + time: 09:00 timezone: Europe/Paris open-pull-requests-limit: 10 - package-ecosystem: github-actions directory: / schedule: interval: daily - time: "09:00" + time: 09:00 timezone: Europe/Paris diff --git a/.mergify.yml b/.mergify.yml index 32a806c..03131a9 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -26,7 +26,7 @@ pull_request_rules: - check-success = test (3.13) - "#approved-reviews-by=0" - "#changes-requested-reviews-by=0" - - "review-requested != @devs" + - review-requested != @devs actions: request_reviews: teams: diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 0000000..8aefdcb --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,22 @@ +extends: default +ignore: | + .git + spectral-lint/node_modules + zfixtures + .venv +rules: + document-start: disable + truthy: disable + comments: + level: error + # Buggy checks: + # https://github.com/adrienverge/yamllint/issues/375 + # https://github.com/adrienverge/yamllint/issues/141 + # https://github.com/adrienverge/yamllint/issues/384 + comments-indentation: disable + line-length: + max: 110 + quoted-strings: + quote-type: double + required: only-when-needed + allow-quoted-quotes: true diff --git a/poe.toml b/poe.toml index efa5a9c..d74d67b 100644 --- a/poe.toml +++ b/poe.toml @@ -14,6 +14,7 @@ sequence = [ "mypy", "codespell", "semgrep --config=auto --error --timeout=15", + "yamllint .", ] [tool.poe.tasks.setup] diff --git a/poetry.lock b/poetry.lock index 1403f6c..3d9d8ae 100644 --- a/poetry.lock +++ b/poetry.lock @@ -839,6 +839,17 @@ files = [ {file = "pastel-0.2.1.tar.gz", hash = "sha256:e6581ac04e973cac858828c6202c1e1e81fee1dc7de7683f3e1ffe0bfd8a573d"}, ] +[[package]] +name = "pathspec" +version = "0.12.1" +description = "Utility library for gitignore style pattern matching of file paths." +optional = false +python-versions = ">=3.8" +files = [ + {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, + {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, +] + [[package]] name = "peewee" version = "3.17.8" @@ -1498,6 +1509,24 @@ files = [ {file = "wrapt-1.17.0.tar.gz", hash = "sha256:16187aa2317c731170a88ef35e8937ae0f533c402872c1ee5e6d079fcf320801"}, ] +[[package]] +name = "yamllint" +version = "1.35.1" +description = "A linter for YAML files." +optional = false +python-versions = ">=3.8" +files = [ + {file = "yamllint-1.35.1-py3-none-any.whl", hash = "sha256:2e16e504bb129ff515b37823b472750b36b6de07963bd74b307341ef5ad8bdc3"}, + {file = "yamllint-1.35.1.tar.gz", hash = "sha256:7a003809f88324fd2c877734f2d575ee7881dd9043360657cc8049c809eba6cd"}, +] + +[package.dependencies] +pathspec = ">=0.5.3" +pyyaml = "*" + +[package.extras] +dev = ["doc8", "flake8", "flake8-import-order", "rstcheck[sphinx]", "sphinx"] + [[package]] name = "zipp" version = "3.21.0" @@ -1520,4 +1549,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.10,<4" -content-hash = "b85506e85d0e7a13a1af0cb5abeddfdae3f2a0b375119a09203ecba90d8ab32d" +content-hash = "7b94b66fb24fa2e3257f7f624ce026613a919b601d81d4599748ae468ef9a5c8" diff --git a/pyproject.toml b/pyproject.toml index 6c91bd4..2a26ce7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ pytest = "^8.3.4" poethepoet = "^0.31.1" codespell = "^2.3.0" semgrep = "^1.99.0" +yamllint = "^1.35.1" [build-system] requires = ["poetry-core"]