The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(scripts): print the make check verdict on early informational exits
mateo-berri3fbe40c9b10f
diff --git a/scripts/pre_commit_lint.sh b/scripts/pre_commit_lint.shindex e19012613cd..82498ec10cd 100755--- a/scripts/pre_commit_lint.sh+++ b/scripts/pre_commit_lint.sh@@ -55,11 +55,13 @@ elsemerge_base=$(git merge-base origin/litellm_internal_staging HEAD 2>/dev/null) || {echo "check: cannot resolve the merge base with origin/litellm_internal_staging." >&2echo " Fix: git fetch origin litellm_internal_staging" >&2+ echo "check: FAIL"exit 1}scope=$(printf '%s\n' "$(git diff --name-only --diff-filter=ACMRD "$merge_base")" "$untracked" | sed '/^$/d' | sort -u)if [ -z "$scope" ]; thenecho "check: nothing to check (no staged files, no working-tree changes, no branch changes vs origin/litellm_internal_staging)"+ echo "check: PASS"exit 0fiecho "check: nothing staged; scoping to the working tree's diff against the merge base with origin/litellm_internal_staging:"diff --git a/tests/test_litellm/test_pre_commit_lint.py b/tests/test_litellm/test_pre_commit_lint.pyindex 7ce16032641..33baf7474ce 100644--- a/tests/test_litellm/test_pre_commit_lint.py+++ b/tests/test_litellm/test_pre_commit_lint.py@@ -224,6 +224,7 @@ def test_nothing_staged_and_no_changes_is_an_explicit_no_op(tmp_path: Path) -> Nproc = _run(repo, bin_dir, {})assert proc.returncode == 0, proc.stdout + proc.stderrassert "nothing to check" in proc.stdout+ assert "check: PASS" in proc.stdoutassert "linting Python" not in proc.stdout@@ -234,6 +235,7 @@ def test_nothing_staged_without_a_base_ref_fails_with_a_fetch_hint(tmp_path: Patassert proc.returncode == 1assert "cannot resolve the merge base" in proc.stdoutassert "git fetch origin litellm_internal_staging" in proc.stdout+ assert "check: FAIL" in proc.stdoutdef test_partial_staging_warns_which_checks_were_skipped(tmp_path: Path) -> None: