Some checks failed
CI / Test (1.24) (push) Successful in -25m43s
CI / Test (1.25) (push) Successful in -25m39s
CI / Build (push) Successful in -25m54s
CI / Lint (push) Successful in -25m43s
Integration Tests / Integration Tests (push) Failing after -26m1s
Release / Build and Release (push) Successful in -24m59s
66 lines
2.8 KiB
Markdown
66 lines
2.8 KiB
Markdown
## Inspector TODO
|
|
|
|
See the [Inspector README](./README.md) for complete documentation of implemented features.
|
|
|
|
### Implemented ✓
|
|
|
|
- [x] Core validation framework with configurable rules
|
|
- [x] YAML configuration with three severity levels (enforce/warn/off)
|
|
- [x] Generic validators (table_regexpr, column_regexpr)
|
|
- [x] Primary key validation (naming, datatype, auto-increment)
|
|
- [x] Foreign key validation (column naming, constraint naming, indexes)
|
|
- [x] Naming convention validation (snake_case, custom patterns)
|
|
- [x] Length validation (table names, column names)
|
|
- [x] Reserved keywords detection
|
|
- [x] Schema integrity checks (missing PKs, orphaned FKs, circular dependencies)
|
|
- [x] Multiple output formats (Markdown with ANSI colors, JSON)
|
|
- [x] Terminal-aware color output
|
|
- [x] All input formats supported (PostgreSQL, DBML, JSON, GORM, Bun, etc.)
|
|
- [x] CI/CD integration support (proper exit codes)
|
|
- [x] Comprehensive documentation and examples
|
|
|
|
### Future Enhancements
|
|
|
|
#### Reporting Enhancements
|
|
- [ ] Add verbose mode to show all passing checks in detail
|
|
- [ ] Add summary-only mode (suppress violation details)
|
|
- [ ] Group violations by table/schema in report
|
|
- [ ] Add statistics: most violated rules, tables with most issues
|
|
- [ ] HTML report format with interactive filtering
|
|
|
|
#### Additional Validators
|
|
- [ ] Optimal column order for space and storage efficiency
|
|
- [ ] Similar-sounding column names detection (synonyms, typos)
|
|
- [ ] Plural/singular table name consistency
|
|
- [ ] Column order validation (PK first, FKs next, data columns, timestamps last)
|
|
- [ ] Data type consistency across related columns
|
|
- [ ] Index coverage analysis
|
|
- [ ] Unused indexes detection
|
|
- [ ] Missing indexes on commonly filtered columns
|
|
- [ ] Table size estimates and warnings for large tables
|
|
- [ ] Function naming conventions (here we have my rules used in Bitech etc. Work from a rules file.)
|
|
- [ ] View naming conventions
|
|
- [ ] Enum naming conventions
|
|
- [ ] Custom type naming conventions
|
|
- [ ] Table name consistency across related tables
|
|
|
|
#### Auto-Fix Capabilities
|
|
- [ ] Auto-fix mode (`relspec inspect --fix`)
|
|
- [ ] Update foreign key types to match primary key types
|
|
- [ ] Rename foreign keys to match primary key names with configurable prefix/suffix
|
|
- [ ] Reorder columns according to rules
|
|
- [ ] Add missing indexes on foreign keys
|
|
- [ ] Generate migration scripts for fixes
|
|
- [ ] Dry-run mode to preview changes
|
|
|
|
#### Advanced Features
|
|
- [ ] Custom validator plugins (Go plugin system)
|
|
- [ ] Rule templates for different databases (PostgreSQL, MySQL, etc.)
|
|
- [ ] Rule inheritance and composition
|
|
- [ ] Conditional rules (apply only to certain schemas/tables)
|
|
- [ ] Performance metrics in report (validation time per rule)
|
|
- [ ] Caching for large databases
|
|
- [ ] Incremental validation (only changed tables)
|
|
- [ ] Watch mode for continuous validation
|
|
|