v1.4.0
v1.4.0 — CLI Release and Code Quality
CLI Production Release
- Complete CLI Tool Suite: Production-ready CLI with validate, format, analyze, and parse commands
- High-Performance CLI: 1.38M+ operations/second validation, 2,600+ files/second formatting throughput
- Robust Input Detection: Intelligent file vs SQL detection using
os.Stat()with security limits (10MB max) - Memory Leak Prevention: Fixed critical memory leak in format command with proper AST cleanup patterns
- Comprehensive Testing: Added benchmark tests, integration tests, and CLI command tests
- Error Handling: Enhanced error messages with file access validation and context
CLI Features
- Multi-format Output: Support for JSON, YAML, table, and tree output formats
- Batch Processing: Directory expansion and glob pattern support for processing multiple SQL files
- Security Limits: File size validation, extension checking, and input sanitization
- CI/CD Integration: Format checking mode with proper exit codes for continuous integration
- Performance Benchmarking: Comprehensive benchmark suite validating CLI performance claims
Performance & Quality
- Token Conversion Performance: TokenType.String() method optimized with comprehensive hash map (90+ token types)
- Code Reduction: analyze.go reduced from 570 to 218 lines (-62%) through legacy code elimination
- Static Analysis: All go vet, go fmt, and linting issues resolved
- Test Reliability: Benchmark error handling corrected for concurrent test execution
Technical Implementation
- TokenType String Mapping: Complete hash map implementation covering all 90+ token types vs previous 24 cases
- Legacy Type System Removal: Eliminated
AnalysisResulttype andconvertAnalysisReport()function overhead - Modern CLI Architecture: Unified analysis system using only modern
AnalysisReporttypes - Benchmark Corrections: Fixed goroutine error handling in scalability_bench_test.go and comprehensive_bench_test.go
Documentation Updates
- FIXES_APPLIED.md: Comprehensive documentation of all code quality improvements applied
- Session tracking: Detailed before/after comparisons and impact metrics for all optimizations
- CLI usage patterns: Updated examples reflecting enhanced command functionality
Backward Compatibility
- 100% functional compatibility: All CLI commands maintain identical user-facing behavior
- API preservation: No breaking changes to public interfaces or command-line arguments
- Performance maintained: All existing functionality performs at same or better speed
Goals Achieved
- ✅ CLI command modernization and optimization
- ✅ Significant code reduction through legacy elimination (-350+ lines)
- ✅ Performance optimization of core token conversion operations
- ✅ Complete static analysis compliance (go vet, go fmt clean)
- ✅ Enhanced test reliability and benchmark correctness