agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
25 lines (22 loc) • 826 B
JavaScript
/**
* @file Performance file analyzer
* @description Analyzes a single file for performance issues
*
* This module now delegates to performanceFileAnalyzerAST.js which provides
* AST-based analysis with regex fallback for better accuracy.
*/
// Import the AST-based analyzer
const { analyzeFilePerformance: analyzeFilePerformanceAST } = require('./performanceFileAnalyzerAST');
/**
* Analyzes a single file for performance issues
* @param {string} filePath - Path to the file
* @param {string} content - File content (optional)
* @returns {Promise<Object>} Performance analysis results for the file
*/
async function analyzeFilePerformance(filePath, content = null) {
// Delegate to the AST-based analyzer
return analyzeFilePerformanceAST(filePath, content);
}
module.exports = {
analyzeFilePerformance
};