UNPKG

agentsqripts

Version:

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

21 lines (19 loc) 519 B
/** * @file Severity level provider * @description Provides severity levels based on SRP violation scores */ /** * Get severity level based on score * @param {number} score - SRP violation score * @returns {string} Severity level */ function getSeverityLevel(score) { if (score >= 8) return 'CRITICAL'; if (score >= 6) return 'HIGH'; // Raised threshold to reduce false positives if (score >= 3) return 'MEDIUM'; if (score > 0) return 'LOW'; return 'NONE'; } module.exports = { getSeverityLevel };