mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 06:36:38 +08:00
代码质量优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: swagger license license-check build-embedded
|
||||
.PHONY: swagger license license-check build-embedded build-test
|
||||
|
||||
swagger:
|
||||
scripts/swagger.sh
|
||||
@@ -16,4 +16,21 @@ build-embedded:
|
||||
go build -tags embed_frontend -o bin/wavelet main.go
|
||||
|
||||
code-check:
|
||||
cd frontend && npx eslint . --max-warnings 0
|
||||
cd frontend && pnpm tsc --noEmit --jsx preserve && npx eslint . --max-warnings 0
|
||||
golangci-lint run
|
||||
|
||||
build-test:
|
||||
@echo "==> Running frontend and backend build tests in parallel..."
|
||||
@PIDS=""; \
|
||||
STATUS=0; \
|
||||
( cd frontend && pnpm build 2>&1 | sed 's/^/[frontend] /' ) & PIDS="$$PIDS $$!"; \
|
||||
( go build -o /dev/null ./... 2>&1 | sed 's/^/[backend] /' ) & PIDS="$$PIDS $$!"; \
|
||||
for PID in $$PIDS; do \
|
||||
wait $$PID || STATUS=1; \
|
||||
done; \
|
||||
if [ $$STATUS -eq 0 ]; then \
|
||||
echo "==> All build tests passed."; \
|
||||
else \
|
||||
echo "==> Build test FAILED." >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user