diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1eeac95..8aa3a3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,7 +54,7 @@ repos: - id: shellcheck args: ["--severity=warning"] - repo: https://github.com/rapidsai/pre-commit-hooks - rev: v1.6.0 + rev: v1.7.0 hooks: - id: verify-copyright args: [--fix, --spdx] @@ -63,6 +63,7 @@ repos: [.]py$| [.]pre-commit-config[.]yaml$| [.]pre-commit-hooks[.]yaml$| + [.]yamllint[.]yaml$| pyproject[.]toml$| [.]flake8$| [.]gitignore$ @@ -74,3 +75,7 @@ repos: rev: v1.24.1 hooks: - id: zizmor + - repo: https://github.com/adrienverge/yamllint + rev: v1.38.0 + hooks: + - id: yamllint diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 0000000..55e6709 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,35 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +extends: default + +rules: + anchors: + forbid-undeclared-aliases: true + forbid-duplicated-anchors: true + forbid-unused-anchors: true + braces: + forbid: false + max-spaces-inside: 0 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + brackets: enable + colons: + max-spaces-before: 0 + max-spaces-after: 1 + commas: + max-spaces-before: 0 + min-spaces-after: 1 + max-spaces-after: 1 + comments: disable + comments-indentation: disable + document-end: disable + document-start: disable + key-duplicates: + forbid-duplicated-merge-keys: true + line-length: disable + truthy: + allowed-values: ['false', 'true'] + # having problematic value in keys is rare... and also + # GitHub Actions' choice of 'on:' triggers this check + # ref: https://github.com/adrienverge/yamllint/issues/430 + check-keys: false