codecontext analyze

Comprehensive code analysis and insights

NEWConsolidates: performance, testing, security analysis

The new analyze command provides comprehensive code analysis including performance bottlenecks, test coverage, security vulnerabilities, and code quality insights. This powerful command consolidates multiple analysis types into one intuitive interface.

Performance

Identify bottlenecks and optimization opportunities

Testing

Generate tests and analyze coverage gaps

Security

Scan for vulnerabilities and security issues

Quality

Code complexity and maintainability insights

$ codecontext analyze

Comprehensive analysis - all categories

$ codecontext analyze --performance

Focus on performance bottlenecks

$ codecontext analyze --tests

Test generation and coverage analysis

Analysis Output

🔍 CodeContext Analysis Report
📊 Performance Score: B+ (87/100)
Memory usage: Optimized
CPU bottlenecks: 3 identified ⚠️
Database queries: Efficient
🧪 Test Coverage: 78%
Unit tests: 156 passing
Integration tests: 12 missing ⚠️
Critical paths covered: 92%
🛡️ Security: 2 issues found
High: SQL injection risk in auth.ts
Medium: Weak password validation
Dependencies: All secure
🎯 Code Quality: A- (91/100)
Complexity: Low to moderate
Maintainability: High
Technical debt: 2.3 hours

Analysis Options

--performance

Analyze performance bottlenecks, memory usage, and optimization opportunities

$ codecontext analyze --performance --files src/api/

--tests

Analyze test coverage, generate missing tests, and identify edge cases

$ codecontext analyze --tests --generate

--security

Scan for security vulnerabilities, dependency issues, and code security patterns

$ codecontext analyze --security --severity high

Combined Options

Run multiple analysis types together for comprehensive insights

$ codecontext analyze --performance --tests --security

Migration from Legacy Commands

⚠️ Replaced Commands

codecontext perfcodecontext analyze --performance
codecontext testcodecontext analyze --tests

Old commands still work but show deprecation warnings. Update your scripts to use the new consolidated syntax.

Related Commands