UNPKG

agentsqripts

Version:

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

29 lines (25 loc) 857 B
/** * @file Project priority calculation for cleanup analysis * @description Calculates cleanup priority at project level */ /** * Calculate project-level cleanup priority * @param {number} averageScore - Average cleanup score across files * @param {number} highPriorityRatio - Ratio of high priority files * @param {number} totalFiles - Total number of files analyzed * @returns {string} Project priority level */ function calculateProjectPriority(averageScore, highPriorityRatio, totalFiles = 1) { // High priority if many files need cleanup or average score is low if (averageScore < 50 || highPriorityRatio > 0.3) { return 'HIGH'; } // Medium priority for moderate cleanup needs if (averageScore < 75 || highPriorityRatio > 0.1) { return 'MEDIUM'; } return 'LOW'; } module.exports = { calculateProjectPriority };