@blast-shield/core
v0.0.30
Published
Core library for the Blast Shield technical debt protection tool. This package contains the debt analysis logic, debt metrics, and reporting functionality.
Readme
🛡️ Blast Shield Core
Core library for the Blast Shield technical debt protection tool. This package contains the debt analysis logic, debt metrics, and reporting functionality.
Development
pnpm build # Build the package
pnpm test # Run tests
pnpm lint # Run Biome linter🧪 Testing
This package uses Vitest for unit testing.
Running Tests
# Run tests once
pnpm test
# Run tests in watch mode (auto-rerun on changes)
pnpm test:watch
# Run tests with coverage report
pnpm test:coverageTest Coverage
The test suite includes comprehensive coverage for:
- Debt Indicator Detection (
matchesDebtIndicator)- ✅ Singular forms (BUG, TODO, FIXME, etc.)
- ✅ Plural forms (BUGS, TODOS, FIXMES, etc.)
- ✅ Case variations (bug, BuG, BUGS)
- ✅ Different punctuation (BUG:, BUG!, BUG-, etc.)
- ✅ Edge cases (standalone indicators)
- ✅ False positive prevention (BUGGY, BUILDING, DEBUG)
Total: 40+ test cases ensuring robust debt indicator detection.
Test Files
Tests are located in src/**/__tests__/*.test.ts
📦 Package Structure
core/
├── src/
│ ├── debt-analysis/ # Debt analysis engine
│ │ ├── analyzers.ts # File analysis & scoring
│ │ ├── collector.ts # Metrics collection
│ │ ├── types.ts # Type definitions
│ │ └── __tests__/ # Unit tests
│ ├── config/ # Configuration management
│ │ ├── profiles/ # Predefined profiles
│ │ └── types.ts # Config types
│ └── utils/ # Utility functions
└── dist/ # Compiled output