From e2175d9c7e62b437391dfee996b1375674ba7c18 Mon Sep 17 00:00:00 2001 From: whx <56632993+whx-sjtu@users.noreply.github.com> Date: Fri, 13 Feb 2026 15:53:16 +0800 Subject: [PATCH] [Lint] Adapt lint tools for windows (#6727) ### What this PR does / why we need it? If users run bash format.sh with `git bash` on windows system, there exists `Executable /bin/bash not found` error. This is because in Windows Git Bash environment, the Bash executable is actually located at `/usr/bin/bash`, while the `/bin` directory may not exist, or may be just an empty directory or a broken symlink that does not contain bash. ### Does this PR introduce _any_ user-facing change? None ### How was this patch tested? With this PR and `pre-commit` installed, windows coders can directly run `bash format.sh` to clean lint issues. - vLLM version: v0.15.0 - vLLM main: https://github.com/vllm-project/vllm/commit/9562912cead1f11e8540fb91306c5cbda66f0007 Signed-off-by: whx-sjtu <2952154980@qq.com> --- tools/actionlint.sh | 2 +- tools/check_repo.sh | 2 +- tools/collect_user_first_contribution.sh | 2 +- tools/install_flash_infer_attention_score_ops_a2.sh | 2 +- tools/install_flash_infer_attention_score_ops_a3.sh | 2 +- tools/mooncake_installer.sh | 2 +- tools/mypy.sh | 2 +- tools/png-lint.sh | 2 +- tools/shellcheck.sh | 2 +- tools/sphinx-lint.sh | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/actionlint.sh b/tools/actionlint.sh index d1950db5..35b8f52b 100755 --- a/tools/actionlint.sh +++ b/tools/actionlint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/check_repo.sh b/tools/check_repo.sh index 7b01da0f..cba30a16 100644 --- a/tools/check_repo.sh +++ b/tools/check_repo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/collect_user_first_contribution.sh b/tools/collect_user_first_contribution.sh index e94e57f9..6ff1df31 100644 --- a/tools/collect_user_first_contribution.sh +++ b/tools/collect_user_first_contribution.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/install_flash_infer_attention_score_ops_a2.sh b/tools/install_flash_infer_attention_score_ops_a2.sh index 7f1fe4cd..96cb8659 100644 --- a/tools/install_flash_infer_attention_score_ops_a2.sh +++ b/tools/install_flash_infer_attention_score_ops_a2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/install_flash_infer_attention_score_ops_a3.sh b/tools/install_flash_infer_attention_score_ops_a3.sh index b833bf2d..95bedf5a 100644 --- a/tools/install_flash_infer_attention_score_ops_a3.sh +++ b/tools/install_flash_infer_attention_score_ops_a3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/mooncake_installer.sh b/tools/mooncake_installer.sh index d9a92bd4..18d47d4a 100644 --- a/tools/mooncake_installer.sh +++ b/tools/mooncake_installer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/mypy.sh b/tools/mypy.sh index b8b14b0d..fcdfcde0 100755 --- a/tools/mypy.sh +++ b/tools/mypy.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/png-lint.sh b/tools/png-lint.sh index 3eb76670..721adf7a 100755 --- a/tools/png-lint.sh +++ b/tools/png-lint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/shellcheck.sh b/tools/shellcheck.sh index e0833f39..f3900708 100755 --- a/tools/shellcheck.sh +++ b/tools/shellcheck.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved. diff --git a/tools/sphinx-lint.sh b/tools/sphinx-lint.sh index 2bedf37a..6fbd894d 100755 --- a/tools/sphinx-lint.sh +++ b/tools/sphinx-lint.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.