export const BugMlMensagens = {
    altaProbabilidade: (prob, fatores) => `ML: 高概率存在错误 (${prob}%)。因素: ${fatores}`,
    mlPattern: (confianca, message) => `[ML ${confianca}%] ${message}`,
    complexidadeCiclomatica: (count) => `高圈复杂度 (${count})`,
    muitasFuncoes: (count) => `函数数量过多 (${count})`,
    aninhamentoProfundo: (depth) => `嵌套过深 (${depth} 层)`,
    arquivoMuitoLongo: (count) => `文件过长 (${count} 行)`,
    castsInseguros: (count) => `频繁的不安全类型转换 (${count})`,
    usoExcessivoAny: (count) => `过度使用 'any' (${count})`,
    promisesSemTratamento: 'Promise 缺少错误处理',
    muitosTODOs: '大量 TODOs/FIXMEs',
    nullPointerDerefMessage: (preview) => `可能的空指针解引用: ${preview}`,
    nullPointerDerefSuggestion: '在链式调用方法前检查结果是否为 null/undefined',
    chamadaSemOptionalMessage: (funcName) => `调用 '${funcName}' 时没有可选链式调用可能导致空指针`,
    chamadaSemOptionalSuggestion: '使用可选链式调用: `?.`',
    memoryLeakMessage: (preview) => `可能的内存泄漏: ${preview} 没有清理`,
    memoryLeakSuggestion: '添加清理操作 (removeEventListener, clearInterval, unsubscribe)',
    raceConditionMessage: '可能的竞态条件: 异步操作之间共享状态',
    raceConditionSuggestion: '对共享状态使用锁或原子操作',
    typeAssumptionMessage: (preview) => `不安全的类型断言: ${preview}`,
    typeAssumptionSuggestion: '在类型转换前验证类型，使用类型守卫',
    unhandledPromiseMessage: '创建的 Promise 没有 then/catch 处理',
    unhandledPromiseSuggestion: '添加 .catch() 或 .then() 来处理结果',
    deepNestingMessage: (depth) => `过度嵌套 (${depth} 层) - bug 概率高`,
    deepNestingSuggestion: '将逻辑提取到更小的函数中以降低复杂度',
    magicNumberMessage: (num) => `魔法数字: ${num} - 考虑提取为命名常量`,
    magicNumberSuggestion: (num) => `为 ${num} 创建描述性命名常量`,
    unsafeComparisonMessage: (preview) => `潜在不安全的比较: ${preview}`,
    unsafeComparisonSuggestion: '使用 === 替代 ==，避免硬编码的密钥'
};
//# sourceMappingURL=detector-bugs-ml-messages.js.map