UNPKG

agentsqripts

Version:

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

37 lines (31 loc) 1.23 kB
/** * @file Analyze async performance patterns * @description Main orchestrator for async pattern analysis */ const detectSequentialAwaits = require('./detectors/detectSequentialAwaits'); const detectAsyncInLoops = require('./detectors/detectAsyncInLoops'); const detectUnhandledPromises = require('./detectors/detectUnhandledPromises'); const detectPromiseAntiPatterns = require('./detectors/detectPromiseAntiPatterns'); const detectAsyncCallbacks = require('./detectors/detectAsyncCallbacks'); /** * Analyze async performance patterns * @param {string} content - File content * @param {string} filePath - File path * @returns {Array} Async performance issues */ function analyzeAsyncPatterns(content, filePath) { // Temporarily disabled to eliminate false positives return []; const issues = []; const lines = content.split('\n'); // Detect various async anti-patterns const asyncIssues = [ detectSequentialAwaits(lines, filePath), detectAsyncInLoops(lines, filePath), detectUnhandledPromises(lines, filePath), detectPromiseAntiPatterns(lines, filePath), detectAsyncCallbacks(lines, filePath) ]; return issues.concat(...asyncIssues); } module.exports = analyzeAsyncPatterns;