-
Notifications
You must be signed in to change notification settings - Fork 23
enforce 'yamllint' checks, expand changed-files exclusions #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,41 +2,54 @@ | |
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-json | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-symlinks | ||
| - id: check-xml | ||
| - repo: https://github.com/rapidsai/pre-commit-hooks | ||
| rev: v1.5.1 | ||
| hooks: | ||
| - id: verify-copyright | ||
| name: verify-copyright | ||
| args: [--fix, --spdx] | ||
| files: | | ||
| (?x) | ||
| [.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs|java)$| | ||
| CMakeLists[.]txt$| | ||
| CMakeLists_standalone[.]txt$| | ||
| meta[.]yaml$| | ||
| dependencies[.]yaml$| | ||
| ^[.]pre-commit-config[.]yaml$ | ||
| # TODO: Re-enable once verify-codeowners supports --org parameter | ||
| # - id: verify-codeowners | ||
| # args: [--fix, --org=NVIDIA, --project-prefix=cuvs-lucene] | ||
| - repo: https://github.com/rapidsai/dependency-file-generator | ||
| rev: v1.21.0 | ||
| hooks: | ||
| - id: rapids-dependency-file-generator | ||
| args: ["--clean", "--warn-all", "--strict"] | ||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.11.0.1 | ||
| hooks: | ||
| - id: shellcheck | ||
| - repo: https://github.com/zizmorcore/zizmor-pre-commit | ||
| rev: v1.26.1 | ||
| hooks: | ||
| - id: zizmor | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: check-json | ||
| - id: trailing-whitespace | ||
| - id: end-of-file-fixer | ||
| - id: check-symlinks | ||
| - id: check-xml | ||
| - repo: https://github.com/rapidsai/pre-commit-hooks | ||
| rev: v1.5.1 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this hook (and maybe others) might be outdated. Feel free to update as part of this PR if you wish.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep it is (the latest is v1.6.1). I just did a The new hook versions didn't require any code changes, just the version bump. |
||
| hooks: | ||
| - id: verify-copyright | ||
| name: verify-copyright | ||
| args: [--fix, --spdx] | ||
| files: | | ||
| (?x) | ||
| [.](cmake|cpp|cu|cuh|h|hpp|sh|pxd|py|pyx|rs|java)$| | ||
| CMakeLists[.]txt$| | ||
| CMakeLists_standalone[.]txt$| | ||
| meta[.]yaml$| | ||
| dependencies[.]yaml$| | ||
| ^[.]pre-commit-config[.]yaml$ | ||
| # TODO: Re-enable once verify-codeowners supports --org parameter | ||
| # - id: verify-codeowners | ||
| # args: [--fix, --org=NVIDIA, --project-prefix=cuvs-lucene] | ||
| - repo: https://github.com/rapidsai/dependency-file-generator | ||
| rev: v1.21.0 | ||
| hooks: | ||
| - id: rapids-dependency-file-generator | ||
| args: ["--clean", "--warn-all", "--strict"] | ||
| - repo: https://github.com/shellcheck-py/shellcheck-py | ||
| rev: v0.11.0.1 | ||
| hooks: | ||
| - id: shellcheck | ||
| - repo: https://github.com/adrienverge/yamllint | ||
| rev: v1.38.0 | ||
| hooks: | ||
| - id: yamllint | ||
| additional_dependencies: [pyyaml] | ||
| exclude: | | ||
| (?x)^( | ||
| [.]github/labeler[.]yml$| | ||
| conda/environments/.*| | ||
| cpp/[.]clang-format$| | ||
| cpp/[.]clang-tidy$| | ||
| .*xfail\-.*yaml$ | ||
| ) | ||
| - repo: https://github.com/zizmorcore/zizmor-pre-commit | ||
| rev: v1.26.1 | ||
| hooks: | ||
| - id: zizmor | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # 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 | ||
| min-spaces-inside: 0 | ||
| # allow 1 space for jinja templating in conda recipes | ||
| max-spaces-inside: 1 | ||
| 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' choie of 'on:' triggers this check | ||
| # ref: https://github.com/adrienverge/yamllint/issues/430 | ||
| check-keys: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposing expanding this list, should help avoid some unnecessary CI runs.