43 lines
1.2 KiB
Bash
Executable File
43 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
echo "=================================================="
|
|
echo " Running RSSPipe Quality Checks "
|
|
echo "=================================================="
|
|
|
|
echo "==> 1. Checking Go formatting (gofmt)..."
|
|
UNFORMATTED=$(gofmt -l internal/ cmd/)
|
|
if [ -n "$UNFORMATTED" ]; then
|
|
echo "ERROR: The following Go files are not formatted properly:"
|
|
echo "$UNFORMATTED"
|
|
echo "Run: gofmt -w internal/ cmd/"
|
|
exit 1
|
|
fi
|
|
echo "✓ Go files formatted correctly."
|
|
|
|
echo "==> 2. Running Go vet..."
|
|
go vet ./...
|
|
echo "✓ Go vet passed."
|
|
|
|
echo "==> 3. Running Go tests..."
|
|
go test -v ./...
|
|
echo "✓ Go tests passed."
|
|
|
|
echo "==> 4. Building React Frontend (TypeScript + Vite)..."
|
|
cd web
|
|
npm run build
|
|
cd ..
|
|
echo "✓ Frontend build passed."
|
|
|
|
echo "==> 5. Running Secret Leak Scan (Gitleaks)..."
|
|
if command -v gitleaks &> /dev/null; then
|
|
gitleaks detect --no-git --source . -c .gitleaks.toml -v
|
|
echo "✓ Gitleaks scan passed."
|
|
else
|
|
echo "⚠ Gitleaks not installed locally, skipping local binary check (will run in CI)."
|
|
fi
|
|
|
|
echo "=================================================="
|
|
echo " 🎉 All RSSPipe checks passed cleanly! "
|
|
echo "=================================================="
|