Skip to content

enforce 'yamllint' checks#2357

Open
jameslamb wants to merge 6 commits into
NVIDIA:mainfrom
jameslamb:yamllint
Open

enforce 'yamllint' checks#2357
jameslamb wants to merge 6 commits into
NVIDIA:mainfrom
jameslamb:yamllint

Conversation

@jameslamb

Copy link
Copy Markdown
Member

Description

Contributes to rapidsai/build-planning#305

Proposes enforcing yamllint checks here. My primary motivation is to catch correctness issues in dependencies.yaml files, like duplicate entries silently resolving to the last one or indentation mistakes leading to filters being ignored.

But this also has some side benefits for consistency, which makes it a bit easier to write automation.

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jul 23, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@jameslamb

Copy link
Copy Markdown
Member Author

/ok to test

@jameslamb jameslamb changed the title WIP: enforce 'yamllint' checks enforce 'yamllint' checks Jul 23, 2026
search:
bounded_queue: [False, True]
check_relative_distance: [False, True]
bounded_queue: [false, true]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yamllint caught these.

YAML 1.1 treats True (capital T) as a boolean true.

YAML 1.2 only supports true / false and treats True as the string "True". See https://yaml.org/spec/1.2.2/#10212-boolean

This maybe hasn't bitten us yet because a lot of YAML parsers still respect the 1.1 spec (example: yaml/pyyaml#116), but it's a nice bit of future-proofing to just use the values supported by both versions.

Comment thread .pre-commit-config.yaml
# SPDX-License-Identifier: Apache-2.0

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff looks huge because there was inconsistent indentation used throughout. Indentation matters for correctness in YAML. I didn't find any cases where the wrong indentation led to an actual issue, but still think it'd be good to standardize on one... so I chose 2 spaces, which lots of other RAPIDS projects use for this file.

In the future, if someone uses a different indentation here yamllint with catch it and complain, so it should help us stay consistent.

Comment thread .pre-commit-config.yaml
Comment on lines +200 to +210
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
additional_dependencies: [pyyaml]
exclude: |
(?x)^(
conda/environments/.*|
cpp/[.]clang-format$|
cpp/[.]clang-tidy$
)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard to spot in this big diff, so just calling out that here's the new yamllint config I'm proposing introducing.

Everything else in this file's diff is just whitespace changes.

@jameslamb
jameslamb marked this pull request as ready for review July 23, 2026 20:22
@jameslamb
jameslamb requested review from a team as code owners July 23, 2026 20:22
@jameslamb
jameslamb requested a review from msarahan July 23, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant