feat: add comprehensive build/type/lint reporting scripts
Added scripts/reports/{all,types,build,lint} for systematic checks:
- types: Run tsc --noEmit on all features
- build: Run build on all features
- lint: Run lint on all features
- all: Run all three checks
Reports saved to .reports/ (gitignored)
Current status: 28/33 features have typecheck errors (pre-existing)
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a2379f8bcc
commit
4d440e47e4
5 changed files with 199 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -144,3 +144,4 @@ MODULE_STRUCTURE.txt
|
|||
*.gitlab-ci-test.txt
|
||||
reports/*.json
|
||||
reports/*.md
|
||||
.reports/
|
||||
|
|
|
|||
51
scripts/reports/all
Executable file
51
scripts/reports/all
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
# Run all checks (build, types, lint)
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(dirname "$0")"
|
||||
exit_code=0
|
||||
|
||||
echo "=========================================="
|
||||
echo " RUNNING ALL CHECKS"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Run typecheck first (fastest)
|
||||
if "$SCRIPT_DIR/types"; then
|
||||
echo "✓ Typechecks passed"
|
||||
else
|
||||
echo "✗ Typechecks failed"
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# Run lint (medium speed)
|
||||
if "$SCRIPT_DIR/lint"; then
|
||||
echo "✓ Linting passed"
|
||||
else
|
||||
echo "✗ Linting failed"
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
# Run builds (slowest)
|
||||
if "$SCRIPT_DIR/build"; then
|
||||
echo "✓ Builds passed"
|
||||
else
|
||||
echo "✗ Builds failed"
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "=========================================="
|
||||
if [ $exit_code -eq 0 ]; then
|
||||
echo " ALL CHECKS PASSED ✓"
|
||||
else
|
||||
echo " SOME CHECKS FAILED ✗"
|
||||
echo " Check .reports/ for details"
|
||||
fi
|
||||
echo "=========================================="
|
||||
|
||||
exit $exit_code
|
||||
49
scripts/reports/build
Executable file
49
scripts/reports/build
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# Check all feature builds
|
||||
set -euo pipefail
|
||||
|
||||
REPORT_DIR="$(dirname "$0")/../../.reports/build"
|
||||
mkdir -p "$REPORT_DIR"
|
||||
rm -f "$REPORT_DIR"/*.log
|
||||
|
||||
echo "=== CHECKING ALL BACKEND BUILDS ==="
|
||||
for feature in features/*/backend-api; do
|
||||
if [ -f "$feature/package.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
echo -n "Testing $feature_name backend... "
|
||||
if pnpm --filter "./$feature" run build > "$REPORT_DIR/$feature_name-backend.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-backend.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/build/$feature_name-backend.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== CHECKING ALL FRONTEND BUILDS ==="
|
||||
for feature in features/*/frontend-*; do
|
||||
if [ -f "$feature/package.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
component_name=$(basename "$feature")
|
||||
echo -n "Testing $feature_name/$component_name... "
|
||||
if pnpm --filter "./$feature" run build > "$REPORT_DIR/$feature_name-$component_name.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-$component_name.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/build/$feature_name-$component_name.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== SUMMARY ==="
|
||||
failed_count=$(ls "$REPORT_DIR"/*.log 2>/dev/null | wc -l)
|
||||
if [ "$failed_count" -eq 0 ]; then
|
||||
echo "All builds passed! ✓"
|
||||
exit 0
|
||||
else
|
||||
echo "$failed_count build(s) failed. Logs in .reports/build/"
|
||||
ls "$REPORT_DIR"/*.log | sed 's|.*/||; s|\.log$||' | sed 's/^/ - /'
|
||||
exit 1
|
||||
fi
|
||||
49
scripts/reports/lint
Executable file
49
scripts/reports/lint
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# Check all feature linting
|
||||
set -euo pipefail
|
||||
|
||||
REPORT_DIR="$(dirname "$0")/../../.reports/lint"
|
||||
mkdir -p "$REPORT_DIR"
|
||||
rm -f "$REPORT_DIR"/*.log
|
||||
|
||||
echo "=== CHECKING ALL BACKEND LINTING ==="
|
||||
for feature in features/*/backend-api; do
|
||||
if [ -f "$feature/package.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
echo -n "Testing $feature_name backend... "
|
||||
if pnpm --filter "./$feature" run lint > "$REPORT_DIR/$feature_name-backend.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-backend.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/lint/$feature_name-backend.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== CHECKING ALL FRONTEND LINTING ==="
|
||||
for feature in features/*/frontend-*; do
|
||||
if [ -f "$feature/package.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
component_name=$(basename "$feature")
|
||||
echo -n "Testing $feature_name/$component_name... "
|
||||
if pnpm --filter "./$feature" run lint > "$REPORT_DIR/$feature_name-$component_name.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-$component_name.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/lint/$feature_name-$component_name.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== SUMMARY ==="
|
||||
failed_count=$(ls "$REPORT_DIR"/*.log 2>/dev/null | wc -l)
|
||||
if [ "$failed_count" -eq 0 ]; then
|
||||
echo "All linting passed! ✓"
|
||||
exit 0
|
||||
else
|
||||
echo "$failed_count lint check(s) failed. Logs in .reports/lint/"
|
||||
ls "$REPORT_DIR"/*.log | sed 's|.*/||; s|\.log$||' | sed 's/^/ - /'
|
||||
exit 1
|
||||
fi
|
||||
49
scripts/reports/types
Executable file
49
scripts/reports/types
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# Check all feature typechecks
|
||||
set -euo pipefail
|
||||
|
||||
REPORT_DIR="$(dirname "$0")/../../.reports/types"
|
||||
mkdir -p "$REPORT_DIR"
|
||||
rm -f "$REPORT_DIR"/*.log
|
||||
|
||||
echo "=== CHECKING ALL BACKEND TYPECHECKS ==="
|
||||
for feature in features/*/backend-api; do
|
||||
if [ -f "$feature/tsconfig.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
echo -n "Testing $feature_name backend... "
|
||||
if (cd "$feature" && pnpm exec tsc --noEmit) > "$REPORT_DIR/$feature_name-backend.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-backend.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/types/$feature_name-backend.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== CHECKING ALL FRONTEND TYPECHECKS ==="
|
||||
for feature in features/*/frontend-*; do
|
||||
if [ -f "$feature/tsconfig.json" ]; then
|
||||
feature_name=$(basename $(dirname "$feature"))
|
||||
component_name=$(basename "$feature")
|
||||
echo -n "Testing $feature_name/$component_name... "
|
||||
if (cd "$feature" && pnpm exec tsc --noEmit) > "$REPORT_DIR/$feature_name-$component_name.log" 2>&1; then
|
||||
echo "✓ PASS"
|
||||
rm "$REPORT_DIR/$feature_name-$component_name.log"
|
||||
else
|
||||
echo "✗ FAIL (see .reports/types/$feature_name-$component_name.log)"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== SUMMARY ==="
|
||||
failed_count=$(ls "$REPORT_DIR"/*.log 2>/dev/null | wc -l)
|
||||
if [ "$failed_count" -eq 0 ]; then
|
||||
echo "All typechecks passed! ✓"
|
||||
exit 0
|
||||
else
|
||||
echo "$failed_count typecheck(s) failed. Logs in .reports/types/"
|
||||
ls "$REPORT_DIR"/*.log | sed 's|.*/||; s|\.log$||' | sed 's/^/ - /'
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue