1.5 KiB
1.5 KiB
name, description
| name | description |
|---|---|
| check-status | Show current code status including uncommitted changes, test health, and build state. Use to get a quick overview before starting work or before committing. |
Show a comprehensive status report of the HealthLink-HIS codebase:
1. Git status
git status
git log --oneline -5
2. Uncommitted changes
git diff --stat
git diff --name-only
3. Backend health (quick check)
cd healthlink-his-server
mvn clean compile -DskipTests -q
echo "Backend compile: $?"
4. Frontend health (quick check)
cd healthlink-his-ui
npm run build:dev --silent 2>&1 | tail -5
npm run lint --silent 2>&1 | tail -10
5. Test status
# Backend: check if tests exist for modified files
git diff --name-only | grep -E "\.java$" | while read f; do
test_file=$(echo "$f" | sed 's/src\/main/src\/test/' | sed 's/\.java$/Test\.java/')
if [ -f "$test_file" ]; then
echo "✓ Test exists: $test_file"
else
echo "⚠ No test: $f"
fi
done
# Frontend: check test coverage
cd healthlink-his-ui
npm run test:run -- --reporter=basic 2>&1 | grep -E "(PASS|FAIL|Tests|Coverage)"
Report format:
=== Git Status ===
Branch: develop
Uncommitted: X files
Last commit: abc1234 (message)
=== Backend ===
Compile: ✓/✗
Modified files: X
Tests missing: Y
=== Frontend ===
Build: ✓/✗
Lint: ✓/✗ (X warnings, Y errors)
Tests: X passed, Y failed
=== Ready to commit? ===
✓/✗ (list blockers if any)
Iron Law 3 reminder:
"编译 + 测试全部通过后才能 git commit"