- 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>
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
# Performance Rules Configuration
|
|
# ================================
|
|
# Performance-focused validation rules for the codebase.
|
|
# Run with: python scripts/validate_performance.py
|
|
|
|
version: "1.0"
|
|
project: "letzshop-product-import"
|
|
|
|
description: |
|
|
Performance validation rules to detect inefficient patterns and ensure
|
|
optimal performance across the application.
|
|
|
|
principles:
|
|
- name: "Minimize Database Queries"
|
|
description: "Reduce N+1 queries and optimize data fetching"
|
|
- name: "Efficient Data Structures"
|
|
description: "Use appropriate data structures for the task"
|
|
- name: "Lazy Loading"
|
|
description: "Load data only when needed"
|
|
- name: "Caching Strategy"
|
|
description: "Cache expensive computations and frequent queries"
|
|
- name: "Async I/O"
|
|
description: "Use async for I/O-bound operations"
|
|
|
|
includes:
|
|
- database.yaml
|
|
- caching.yaml
|
|
- api.yaml
|
|
- async.yaml
|
|
- memory.yaml
|
|
- frontend.yaml
|
|
|
|
severity_levels:
|
|
error:
|
|
description: "Critical performance issue that must be fixed"
|
|
exit_code: 1
|
|
warning:
|
|
description: "Performance concern that should be addressed"
|
|
exit_code: 0
|
|
info:
|
|
description: "Performance optimization recommendation"
|
|
exit_code: 0
|
|
|
|
ignore:
|
|
files:
|
|
- "**/test_*.py"
|
|
- "**/tests/**"
|
|
- "**/*_test.py"
|
|
- "**/conftest.py"
|
|
- "**/migrations/**"
|
|
- "**/.venv/**"
|
|
- "**/venv/**"
|
|
- "**/node_modules/**"
|
|
- "**/site/**"
|
|
- "**/scripts/**"
|
|
- "**/__pycache__/**"
|
|
- "**/*.pyc"
|
|
patterns:
|
|
# Allow patterns in test files
|
|
- file: "**/tests/**"
|
|
pattern: ".*"
|
|
reason: "Test files may have different performance requirements"
|
|
# Allow patterns in scripts
|
|
- file: "**/scripts/**"
|
|
pattern: "\\.all\\(\\)"
|
|
reason: "Scripts may need to process all records"
|