agentsqripts
Version:
Comprehensive static code analysis toolkit for identifying technical debt, security vulnerabilities, performance issues, and code quality problems
30 lines (26 loc) • 701 B
JavaScript
/**
* @file Grade calculation utilities
* @description Responsible for determining DRY code grades based on scores
*/
const { getLetterGrade } = require('../utils/gradeUtils');
/**
* Gets DRY grade based on score (using standard academic grading)
* @param {number} score - DRY score (0-100, higher is better)
* @returns {string} Grade letter
*/
function getDryGrade(score) {
return getLetterGrade(score);
}
/**
* Legacy function for backward compatibility
* @deprecated Use getDryGrade instead
*/
function getWetGrade(wetScore) {
// Convert WET score to DRY score
const dryScore = 100 - wetScore;
return getDryGrade(dryScore);
}
module.exports = {
getDryGrade,
getWetGrade
};