Files
jiu/.claude/commands/build.md
T
wangjia e550b73d6d chore(commands): build/test/release 流程统一用 claude-sonnet-4-6 模型,新增 /build /test 命令
- release.md 补 frontmatter(model: claude-sonnet-4-6)
- 新增 /build:go build/vet + flutter analyze 编译静态检查
- 新增 /test:go test + flutter test
- 三者均通过 frontmatter 指定 sonnet 4.6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 15:05:56 +08:00

1.1 KiB
Raw Blame History

description, argument-hint, model, allowed-tools
description argument-hint model allowed-tools
本地编译与静态检查(后端 go build/vet + 前端 flutter analyze 可选 backend | client,留空则全部 claude-sonnet-4-6 Bash

执行本地编译与静态检查,用于快速验证代码可编译、无警告。不产出发布制品(多平台打包由 CI 在发版时完成)。

参数 $ARGUMENTS

  • 留空:检查后端 + 前端
  • backend:仅检查后端
  • client:仅检查前端

任意步骤失败立即停止并报告错误(贴出关键错误输出)。

后端检查(参数为空或 backend 时执行)

export PATH="/opt/homebrew/bin:$PATH"
cd backend && go build ./...   # 1. 编译通过
cd backend && go vet ./...     # 2. 无编译警告

前端检查(参数为空或 client 时执行)

export PATH="/opt/homebrew/bin:$PATH"
cd client && flutter analyze --no-fatal-infos --no-fatal-warnings   # error 才算失败,warning/info 允许

完成报告

全部通过后,用一行 result: 汇总(如 result: 后端 build+vet 通过、前端 analyze 无 error)。 任一失败则停止,指出失败的命令和原因。