refactor: split CLI module into focused formatters and groupers

- Created cli/groupers/ViolationGrouper.ts for severity filtering
- Created cli/formatters/OutputFormatter.ts for violation formatting
- Created cli/formatters/StatisticsFormatter.ts for metrics display
- Reduced cli/index.ts from 484 to 260 lines (46% reduction)
- All 345 tests pass, CLI output identical to before
- No breaking changes
This commit is contained in:
imfozilbek
2025-11-25 16:30:04 +05:00
parent b5f54fc3f8
commit 7fea9a8fdb
7 changed files with 361 additions and 273 deletions

View File

@@ -5,6 +5,19 @@ All notable changes to @samiyev/guardian will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.7.6] - 2025-11-25
### Changed
- ♻️ **Refactored CLI module** - improved maintainability and separation of concerns:
- Split 484-line `cli/index.ts` into focused modules
- Created `cli/groupers/ViolationGrouper.ts` for severity grouping and filtering (29 lines)
- Created `cli/formatters/OutputFormatter.ts` for violation formatting (190 lines)
- Created `cli/formatters/StatisticsFormatter.ts` for metrics and summary (58 lines)
- Reduced `cli/index.ts` from 484 to 260 lines (46% reduction)
- All 345 tests pass, CLI output identical to before
- No breaking changes
## [0.7.5] - 2025-11-25
### Changed