From b37564171bd6f03a499fa1b104c5b7821e52b649 Mon Sep 17 00:00:00 2001 From: ssw Date: Fri, 17 Jul 2026 12:24:56 +0800 Subject: [PATCH] ci(dacli): add check_no_dacli_ts_refs.sh CI gate Co-Authored-By: Claude --- scripts/check_no_dacli_ts_refs.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/check_no_dacli_ts_refs.sh diff --git a/scripts/check_no_dacli_ts_refs.sh b/scripts/check_no_dacli_ts_refs.sh new file mode 100755 index 0000000..04f039e --- /dev/null +++ b/scripts/check_no_dacli_ts_refs.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# CI 关卡: 全 dacli/ + .claude/ 代码库内 `dacli-ts` 引用应为 0. +set -uo pipefail +WORKDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" +HITS=$(grep -rn "dacli-ts" "$WORKDIR/dacli/" "$WORKDIR/.claude/" --include="*.md" --include="*.ts" --include="*.tsx" --include="*.sh" 2>/dev/null | grep -v "check_no_dacli_ts_refs" | wc -l) +if [ "$HITS" -gt 0 ]; then + echo "ERROR: $HITS dacli-ts references remain (should be 0)" + exit 1 +fi +echo "OK: no dacli-ts references remain"