Skip to content

[CI] replace shellcheck script with shellcheck-py hook - #52572

Merged
hmellor merged 7 commits into
vllm-project:mainfrom
wjabbour:rocm/shellcheck-py-hook
Aug 20, 2026
Merged

hmellor merged 7 commits into
vllm-project:mainfrom
wjabbour:rocm/shellcheck-py-hook

Conversation

@wjabbour

@wjabbour wjabbour commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Swaps tools/pre_commit/shellcheck.sh for the shellcheck-precommit hook, pinned to a commit hash (99470f5e1... = v0.11.0) instead of a version tag, per @hmellor's comment on [CI] replace shellcheck script with shellcheck-py hook #37743.
  • Fixes the warnings the hook surfaces on current main (severity=warning): unquoted array/command-substitution expansions, an embedded-literal-quote string-building pattern in two NixlConnector integration test scripts, and one dead variable.

Context

Creating to replace #37743 (thanks @SoluMilken for the original idea and hook config). That PR predates several changes to files it touched (e.g. the NixlConnector test scripts gained an HMA feature and a producer/consumer kv_transfer-config split since then), so rather than resolve stale conflicts I rebuilt the fix against current main and re-ran shellcheck fresh to make sure every change is still correct today.

Test plan

  • shellcheck -s bash --format=gcc --severity=warning passes clean across the whole repo
  • bash -n on every touched script
  • CI (pre-commit hook itself needs Docker in CI to actually execute; verify it runs there)

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@wjabbour
wjabbour force-pushed the rocm/shellcheck-py-hook branch 2 times, most recently from 78dd9d6 to 4874cab Compare August 17, 2026 05:12
@wjabbour

wjabbour commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@hmellor @SoluMilken Created this PR to help move along the shellcheck effort, incorporated Solu's changes and Harry's feedback (commit hash instead of version tag)

Comment thread .pre-commit-config.yaml Outdated
Comment thread .pre-commit-config.yaml Outdated
@wjabbour
wjabbour force-pushed the rocm/shellcheck-py-hook branch from 42d1977 to 78bd77d Compare August 18, 2026 04:54
@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--52572.org.readthedocs.build/en/52572/

@mergify mergify Bot added the documentation Improvements or additions to documentation label Aug 19, 2026
wjabbour and others added 5 commits August 18, 2026 22:40
Swaps the custom tools/pre_commit/shellcheck.sh wrapper for the
shellcheck-precommit hook, pinned to a commit hash rather than a
version tag. Fixes the warnings the new hook surfaces on the current
tree (word-splitting, unquoted array expansions, an embedded-quote
string-building pattern in two NixlConnector test scripts).

Supersedes vllm-project#37743, which had gone stale against main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Turner <doubleujabbour@gmail.com>
koalaman/shellcheck-precommit shells out to a Docker image, which
isn't available in every dev/CI environment and made the hook fail
to run locally. shellcheck-py/shellcheck-py wraps a pip-installed
shellcheck binary instead (matches the PR title and vllm-project#37743's own
choice) and runs cleanly with no Docker dependency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Turner <doubleujabbour@gmail.com>
Addresses hmellor's review comment on vllm-project#52572 asking to fix the
warnings instead of indefinitely excluding the file. Only 3 warnings
remained (SC2155, SC2089, SC2090); the latter two follow the same
string-to-array fix already applied to GPU_DEVICES in
run-multi-node-test.sh earlier in this PR.

Signed-off-by: Turner <doubleujabbour@gmail.com>
… findings across the repo

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Turner <doubleujabbour@gmail.com>

Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
vllm-project#52264 added a chain of failure-diagnostic-collection functions
(append_failure_diagnostic_*, run_failure_diagnostic,
collect_*_diagnostic(s)) that are only reachable transitively through
handle_amd_runner_exit, the EXIT trap handler. handle_amd_runner_exit
itself already carries a shellcheck disable for this reason, but
shellcheck's unused-function check doesn't do full transitive
reachability from an indirectly-invoked entry point - everything that
function calls still reads as dead code. Same false positive already
worked around three times earlier in this file, just needed on the 13
new functions too now that this branch is rebased onto main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Turner <doubleujabbour@gmail.com>
@wjabbour
wjabbour force-pushed the rocm/shellcheck-py-hook branch from e3c40aa to 6cbc057 Compare August 19, 2026 04:47
Comment thread .buildkite/scripts/hardware_ci/run-amd-test.sh
wjabbour and others added 2 commits August 19, 2026 10:32
Per hmellor's review on vllm-project#52572:
- Replace the 13 per-function SC2329 disable comments in run-amd-test.sh
  with a single file-level directive - every function in this file is
  only reachable transitively through the EXIT trap handler, so the
  false positive applies uniformly rather than needing individual
  justification per function. Trimmed the redundant ,SC2329 off the
  three pre-existing SC2317 disables for the same reason (SC2317 stays
  per-function since it's still meaningful elsewhere in the file).
- Prefix the deferred-cleanup shellcheck disable comments (SC2001 x3,
  SC2012, SC1001) with TODO: so they're greppable for the follow-up PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Turner <doubleujabbour@gmail.com>
@hmellor
hmellor enabled auto-merge (squash) August 20, 2026 08:50
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 20, 2026
@hmellor

hmellor commented Aug 20, 2026

Copy link
Copy Markdown
Member

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #84782 for commit 8307f0a61429.

@hmellor
hmellor merged commit 1eab6fe into vllm-project:main Aug 20, 2026
134 checks passed
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
…52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
zufangzhu pushed a commit to zufangzhu/vllm that referenced this pull request Aug 24, 2026
…52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Zhu, Zufang <zufang.zhu@intel.com>
khushali9 pushed a commit to khushali9/vllm that referenced this pull request Aug 29, 2026
…52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: khushali9 <khushali.desai9@gmail.com>
am-cohere pushed a commit to am-cohere/vllm that referenced this pull request Sep 1, 2026
…52572)

Signed-off-by: Turner <doubleujabbour@gmail.com>
Signed-off-by: Turner Jabbour <doubleujabbour@gmail.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
eble-amd added a commit to ROCm/vllm that referenced this pull request Sep 15, 2026
Upstream sync 28/N: merge 1eab6fe [CI] replace shellcheck script with shellcheck-py hook (vllm-project#52572) (conflict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation kv-connector ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants