A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 09:30 UTC
[CI] Make format checker error message more user-friendly by using emoji (#9564)
This PR makes format checker error message more user-friendly by adding emojis.
Kuntai Du committed
Oct 21, 2024 at 18:45 UTC
575dcebe9adc587b26feba02e4c1d13cb69c0305
1 file changed
+20
-4
format.sh
+20
-4
@@ -21,6 +21,20 @@ builtin cd "$(dirname "${BASH_SOURCE:-$0}")"
21
ROOT="$(git rev-parse --show-toplevel)"
22
builtin cd "$ROOT" || exit 1
23
24
+check_command() {
25
+ if ! command -v "$1" &> /dev/null; then
26
+ echo "❓❓$1 is not installed, please run \`pip install -r requirements-lint.txt\`"
27
+ exit 1
28
+ fi
29
+}
30
+
31
+check_command yapf
32
+check_command ruff
33
+check_command mypy
34
+check_command codespell
35
+check_command isort
36
+check_command clang-format
37
+
38
YAPF_VERSION=$(yapf --version | awk '{print $2}')
39
RUFF_VERSION=$(ruff --version | awk '{print $2}')
40
MYPY_VERSION=$(mypy --version | awk '{print $2}')
@@ -31,7 +45,7 @@ CLANGFORMAT_VERSION=$(clang-format --version | awk '{print $3}')
45
# # params: tool name, tool version, required version
46
tool_version_check() {
47
if [[ $2 != $3 ]]; then
34
- echo "Wrong $1 version installed: $3 is required, not $2."
48
+ echo "❓❓Wrong $1 version installed: $3 is required, not $2."
49
exit 1
50
fi
51
}
@@ -281,10 +295,12 @@ tools/actionlint.sh -color
295
echo 'vLLM actionlint: Done'
296
297
if ! git diff --quiet &>/dev/null; then
284
- echo 'Reformatted files. Please review and stage the changes.'
285
- echo 'Changes not staged for commit:'
286
- echo
298
+ echo
299
+ echo "🔍🔍There are files changed by the format checker or by you that are not added and committed:"
300
git --no-pager diff --name-only
301
+ echo "🔍🔍Format checker passed, but please add, commit and push all the files above to include changes made by the format checker."
302
303
exit 1
304
+else
305
+ echo "✨🎉 Format check passed! Congratulations! 🎉✨"
306
fi