CODEX_ADK/BACKEND/code-review-local.sh
Svrnty 229a0698a3 Initial commit: CODEX_ADK monorepo
Multi-agent AI laboratory with ASP.NET Core 8.0 backend and Flutter frontend.
Implements CQRS architecture, OpenAPI contract-first API design.

BACKEND: Agent management, conversations, executions with PostgreSQL + Ollama
FRONTEND: Cross-platform UI with strict typing and Result-based error handling

Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
2025-10-26 23:12:32 -04:00

53 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
# Local Code Review using Roslynator
# No external server required - uses installed analyzers
set -e
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
RED='\033[0;31m'
NC='\033[0m'
echo -e "${GREEN}╔════════════════════════════════════════╗${NC}"
echo -e "${GREEN}║ CODEX Code Review - Local Analysis ║${NC}"
echo -e "${GREEN}╚════════════════════════════════════════╝${NC}\n"
# Restore tools
echo -e "${YELLOW}→ Restoring tools...${NC}"
dotnet tool restore > /dev/null 2>&1
# Clean
echo -e "${YELLOW}→ Cleaning build artifacts...${NC}"
dotnet clean > /dev/null 2>&1
# Analyze with Roslynator
echo -e "\n${BLUE}═══════════════════════════════════════${NC}"
echo -e "${BLUE} Running Roslynator Analysis${NC}"
echo -e "${BLUE}═══════════════════════════════════════${NC}\n"
dotnet roslynator analyze \
--severity-level info \
--output code-review-results.xml \
Codex.sln
echo -e "\n${BLUE}═══════════════════════════════════════${NC}"
echo -e "${BLUE} Code Formatting Check${NC}"
echo -e "${BLUE}═══════════════════════════════════════${NC}\n"
dotnet format --verify-no-changes --verbosity diagnostic || echo -e "${YELLOW}WARNING: Formatting issues detected. Run 'dotnet format' to fix.${NC}"
echo -e "\n${GREEN}═══════════════════════════════════════${NC}"
echo -e "${GREEN} Code Review Complete!${NC}"
echo -e "${GREEN}═══════════════════════════════════════${NC}\n"
if [ -f "code-review-results.xml" ]; then
echo -e "${BLUE}Results saved to: code-review-results.xml${NC}"
fi
echo -e "\n${YELLOW}Quick Commands:${NC}"
echo -e " ${BLUE}dotnet format${NC} - Auto-fix formatting"
echo -e " ${BLUE}dotnet roslynator fix${NC} - Auto-fix code issues"
echo -e " ${BLUE}dotnet build${NC} - Standard build\n"