mirror of
https://github.com/samiyev/puaros.git
synced 2025-12-27 23:06:54 +05:00
feat: add severity-based sorting and filtering for violations (v0.5.2)
- Add CRITICAL/HIGH/MEDIUM/LOW severity levels to all violations - Sort violations by severity automatically (most critical first) - Add CLI flags: --min-severity and --only-critical - Group violations by severity in CLI output with color-coded headers - Update all violation interfaces to include severity field - Maintain 90%+ test coverage with all tests passing - Update CHANGELOG.md, ROADMAP.md, and package version to 0.5.2
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
This document outlines the current features and future plans for @puaros/guardian.
|
||||
|
||||
## Current Version: 0.5.0 ✅ RELEASED
|
||||
## Current Version: 0.5.2 ✅ RELEASED
|
||||
|
||||
**Released:** 2025-11-24
|
||||
|
||||
@@ -159,6 +159,62 @@ class CreateUser {
|
||||
|
||||
---
|
||||
|
||||
## Version 0.5.2 - Severity-Based Prioritization 🎯 ✅ RELEASED
|
||||
|
||||
**Released:** 2025-11-24
|
||||
**Priority:** HIGH
|
||||
|
||||
Intelligently prioritize violations by severity to help teams focus on critical issues first:
|
||||
|
||||
```bash
|
||||
# Show only critical issues
|
||||
guardian check src --only-critical
|
||||
|
||||
# Show high severity and above
|
||||
guardian check src --min-severity high
|
||||
```
|
||||
|
||||
**Severity Levels:**
|
||||
- 🔴 **CRITICAL**: Circular dependencies, Repository pattern violations
|
||||
- 🟠 **HIGH**: Dependency direction violations, Framework leaks, Entity exposures
|
||||
- 🟡 **MEDIUM**: Naming violations, Architecture violations
|
||||
- 🟢 **LOW**: Hardcoded values
|
||||
|
||||
**Implemented Features:**
|
||||
- ✅ Automatic sorting by severity (most critical first)
|
||||
- ✅ CLI flags: `--min-severity <level>` and `--only-critical`
|
||||
- ✅ Color-coded severity labels in output (🔴🟠🟡🟢)
|
||||
- ✅ Visual severity group headers with separators
|
||||
- ✅ Filtering messages when filters active
|
||||
- ✅ All violation interfaces include severity field
|
||||
- ✅ 292 tests passing with 90%+ coverage
|
||||
- ✅ Backwards compatible - no breaking changes
|
||||
|
||||
**Benefits:**
|
||||
- Focus on critical architectural violations first
|
||||
- Gradual technical debt reduction
|
||||
- Better CI/CD integration (fail on critical only)
|
||||
- Improved developer experience with visual prioritization
|
||||
|
||||
---
|
||||
|
||||
## Version 0.5.1 - Code Quality Refactoring 🧹 ✅ RELEASED
|
||||
|
||||
**Released:** 2025-11-24
|
||||
**Priority:** MEDIUM
|
||||
|
||||
Internal refactoring to eliminate hardcoded values and improve maintainability:
|
||||
|
||||
**Implemented Features:**
|
||||
- ✅ Extracted 30+ constants from hardcoded strings
|
||||
- ✅ New constants files: paths.ts, extended Messages.ts
|
||||
- ✅ Reduced hardcoded values from 37 to 1 (97% improvement)
|
||||
- ✅ Guardian passes its own checks (0 violations in src/)
|
||||
- ✅ All 292 tests passing
|
||||
- ✅ No breaking changes - fully backwards compatible
|
||||
|
||||
---
|
||||
|
||||
## Future Roadmap
|
||||
|
||||
### Version 0.6.0 - Aggregate Boundary Validation 🔒
|
||||
|
||||
Reference in New Issue
Block a user