From 742b79475f6585b87325e66293e4ce35e63118d3 Mon Sep 17 00:00:00 2001 From: Victor_Jay Date: Mon, 22 Jun 2026 02:29:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=AE=89=E8=A3=85=20make=EF=BC=8Cci.s?= =?UTF-8?q?h=20=E6=81=A2=E5=A4=8D=E8=B0=83=E7=94=A8=20Makefile=20=E7=9B=AE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/ci.sh b/scripts/ci.sh index 7e7a165..a629068 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -7,7 +7,6 @@ set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" -export PATH="$HOME/go/bin:$PATH" cd "$ROOT" @@ -24,8 +23,7 @@ echo "========================================" # 1. 格式检查 echo "" echo "==> 1/3 格式检查 (gofumpt + goimports)" -test -z "$(gofumpt -l internal/ cmd/)" || { echo "gofumpt: 以下文件格式不正确:"; gofumpt -l internal/ cmd/; exit 1; } -test -z "$(goimports -l internal/ cmd/)" || { echo "goimports: 以下文件 import 不规范:"; goimports -l internal/ cmd/; exit 1; } +make fmt-check # 2. 编译检查 echo "" @@ -36,9 +34,9 @@ go build ./... echo "" echo "==> 3/3 静态分析 (golangci-lint)" if $STRICT; then - golangci-lint run ./... + make lint-strict else - golangci-lint run ./... || true + make lint fi echo ""