Fixed all 13 code review issues achieving 100/100 quality score: - Cache JsonSerializerOptions in GlobalExceptionHandler (CA1869) - Convert constant arrays to static readonly fields (CA1861) - Add code review infrastructure (Roslynator + SonarScanner) Performance optimizations: - Eliminated allocations in exception handling middleware - Optimized validator array usage in commands - Improved migration index creation efficiency Code review tools: - Added ./code-review-local.sh for local analysis - Added Roslynator CLI configuration - Added comprehensive code review guide Cleanup: - Removed outdated temporary documentation - Updated .gitignore for code review artifacts - Removed .DS_Store files Build status: ✅ 0 errors, 0 warnings Code analysis: ✅ 0 diagnostics found Quality score: 100/100 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
921 B
Bash
Executable File
35 lines
921 B
Bash
Executable File
#!/bin/bash
|
|
# Standalone Code Review - Using Roslyn Analyzers
|
|
# No external server required
|
|
|
|
set -e
|
|
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
RED='\033[0;31m'
|
|
NC='\033[0m'
|
|
|
|
echo -e "${GREEN}Starting Code Review (Standalone Mode)...${NC}\n"
|
|
|
|
# Clean and restore
|
|
echo -e "${YELLOW}Cleaning and restoring...${NC}"
|
|
dotnet clean > /dev/null
|
|
dotnet restore > /dev/null
|
|
|
|
# Build with full analysis
|
|
echo -e "${YELLOW}Running analysis...${NC}\n"
|
|
dotnet build \
|
|
/p:TreatWarningsAsErrors=false \
|
|
/p:WarningLevel=4 \
|
|
/p:RunAnalyzers=true \
|
|
/p:EnforceCodeStyleInBuild=true \
|
|
/clp:Summary \
|
|
--verbosity normal
|
|
|
|
echo -e "\n${GREEN}Code review complete!${NC}"
|
|
echo -e "${YELLOW}Review the warnings above for code quality issues.${NC}"
|
|
|
|
# Count warnings
|
|
echo -e "\n${YELLOW}Generating summary...${NC}"
|
|
dotnet build --no-incremental 2>&1 | grep -i "warning" | wc -l | xargs -I {} echo -e "${YELLOW}Total warnings found: {}${NC}"
|