build.cf release#333
Conversation
feat: static analysis for browser rendered preview projects
Nightly -> Main
|
Claude finished @karishnu's task in 1m 35s —— View job Code Quality & Security ReviewRecommendation: ✅ APPROVE PR SummaryThis PR adds in-memory static analysis for browser-rendered projects, enabling code quality checks (JavaScript syntax, HTML tag matching, CSS brace balancing, and CSS class/ID cross-validation) without requiring a sandbox environment. PR Description
Addressed Issues
Code QualityCritical: NoneHigh: NoneMedium:
Low:
SecurityCritical: NoneHigh: NoneMedium: NoneLow:
Architecture & DesignPositives:
Notes:
Testing
Final Recommendation✅ Approve - This is a well-structured feature addition with clean architecture. The code follows existing patterns, properly reuses types, and handles edge cases like utility CSS frameworks. The identified issues are minor and don't block merging. |
Summary
Adds in-memory static analysis for browser-rendered projects, enabling code quality checks without requiring a sandbox environment.
Changes
InMemoryAnalyzerservice with language-specific analyzers:JavaScriptAnalyzer: Syntax validation using acorn parserHTMLAnalyzer: Tag matching and structure validation using htmlparser2CSSAnalyzer: Brace/comment/string balance checkingHTMLCSSCrossValidatorfor cross-file validation (checks CSS class/ID usage)BaseCodingBehaviorto use in-memory analysis for browser-rendered projectsserializeStaticAnalysisto format issues whenrawOutputis not availableacornandhtmlparser2dependenciesMotivation
Browser-rendered projects don't have a sandbox environment to run traditional static analysis tools. This change enables code quality feedback for these projects by performing analysis directly in the worker.
Testing
Breaking Changes
None - this is an additive feature that only affects browser-rendered projects.