UNPKG

agentsqripts

Version:

Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems

35 lines (33 loc) 2.02 kB
/** * @file Context-aware analysis for different file types and patterns for semantic code understanding * @description Single responsibility: Re-export refactored context analyzer functions for comprehensive semantic analysis * * This module serves as the centralized access point for context-aware analysis functionality * used in WET (Write Everything Twice) code detection and semantic similarity assessment. * It provides sophisticated code context understanding capabilities that enable more accurate * duplicate detection by considering semantic meaning, usage patterns, and architectural context. * * Design rationale: * - Re-export pattern maintains clean module boundaries while providing unified access * - Context-aware analysis enables semantic understanding beyond simple syntactic matching * - Modular organization supports independent testing and maintenance of context logic * - Centralized exports prevent scattered imports and ensure consistent context analysis * - Facilitates accurate WET code detection through sophisticated contextual understanding * * Context analysis capabilities: * - File type-specific analysis for framework-aware duplicate detection * - Pattern-based context extraction for meaningful code comparison * - Duplication acceptability rules based on architectural patterns * - Context-aware recommendations for strategic refactoring guidance * - Duplication pattern categorization for targeted improvement strategies */ const analyzeFileContext = require('./context-analyzer/analyzeFileContext'); const isDuplicationAcceptable = require('./context-analyzer/rules/isDuplicationAcceptable'); const getContextAwareRecommendations = require('./context-analyzer/recommendations/getContextAwareRecommendations'); const categorizeDuplicationPattern = require('./context-analyzer/detectors/categorizeDuplicationPattern'); module.exports = { analyzeFileContext, isDuplicationAcceptable, getContextAwareRecommendations, categorizeDuplicationPattern };