feat: add unified code quality dashboard with multiple validators
- Add validator_type field to scans and violations (architecture, security, performance) - Create security validator with SEC-xxx rules - Create performance validator with PERF-xxx rules - Add base validator class for shared functionality - Add validate_all.py script to run all validators - Update code quality service with validator type filtering - Add validator type tabs to dashboard UI - Add validator type filter to violations list - Update stats response with per-validator breakdown - Add security and performance rules documentation - Add chat-bubble icons to icon library 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -243,15 +243,29 @@ class VendorAnalyticsResponse(BaseModel):
|
||||
# ============================================================================
|
||||
|
||||
|
||||
class ValidatorStats(BaseModel):
|
||||
"""Statistics for a single validator type."""
|
||||
|
||||
total_violations: int = 0
|
||||
errors: int = 0
|
||||
warnings: int = 0
|
||||
last_scan: str | None = None
|
||||
|
||||
|
||||
class CodeQualityDashboardStatsResponse(BaseModel):
|
||||
"""Code quality dashboard statistics response schema.
|
||||
|
||||
Used by: GET /api/v1/admin/code-quality/stats
|
||||
|
||||
Supports multiple validator types: architecture, security, performance.
|
||||
When validator_type is specified, returns stats for that type only.
|
||||
When not specified, returns combined stats with per-validator breakdown.
|
||||
"""
|
||||
|
||||
total_violations: int
|
||||
errors: int
|
||||
warnings: int
|
||||
info: int = 0
|
||||
open: int
|
||||
assigned: int
|
||||
resolved: int
|
||||
@@ -263,6 +277,11 @@ class CodeQualityDashboardStatsResponse(BaseModel):
|
||||
by_module: dict[str, Any] = Field(default_factory=dict)
|
||||
top_files: list[dict[str, Any]] = Field(default_factory=list)
|
||||
last_scan: str | None = None
|
||||
validator_type: str | None = None # Set when filtering by type
|
||||
by_validator: dict[str, ValidatorStats] = Field(
|
||||
default_factory=dict,
|
||||
description="Per-validator breakdown (architecture, security, performance)",
|
||||
)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user