chore: establish development baseline

This commit is contained in:
2026-06-28 01:27:09 +08:00
commit dd53e3054e
131 changed files with 19327 additions and 0 deletions
@@ -0,0 +1,152 @@
# 🌸 屎山代码分析报告 🌸
## 📑 目录
- [糟糕指数](#overall-score)
- [评分指标详情](#metrics-details)
- [最屎代码排行榜](#problem-files)
- [诊断结论](#conclusion)
![Score](https://img.shields.io/badge/Score-94%25-brightgreen)
## 糟糕指数 {#overall-score}
| 指标摘要 | 评分 |
|------|-------|
| **糟糕指数** | **93.89/100** |
| 屎山等级 | 🌸 偶有异味 |
> 如沐春风,仿佛被天使亲吻过
### 📊 统计信息
| 指标 | 数值 |
|--------|-------|
| 总文件数 | 44 |
| 已跳过 | 48 |
| 耗时 | 800ms |
## 评分指标详情 {#metrics-details}
| 指标摘要 | 评分 | 状态 |
|:-----|------:|:------:|
| 循环复杂度 | 0.95% | ✓✓ |
| 认知复杂度 | 1.20% | ✓✓ |
| 嵌套深度 | 2.50% | ✓✓ |
| 函数长度 | 0.06% | ✓✓ |
| 文件长度 | 0.00% | ✓✓ |
| 参数数量 | 0.17% | ✓✓ |
| 代码重复 | 0.66% | ✓✓ |
| 结构分析 | 0.59% | ✓✓ |
| 错误处理 | 21.28% | ✓ |
| 注释比例 | 62.69% | ⚠ |
| 命名规范 | 0.16% | ✓✓ |
## 最屎代码排行榜 {#problem-files}
### 1. adapters/src/manifest/addressables.rs
**糟糕指数: 19.98**
**问题**: 🔄 复杂度问题: 3, 🏗️ 结构问题: 1, ❌ 错误处理问题: 1
- 🔄 `parse()` L66: 复杂度: 16
- 🔄 `parse()` L66: 认知复杂度: 26
- 🔄 `parse()` L66: 嵌套深度: 5
- 🏗️ `parse()` L66: 嵌套过深: 5
- ❌ L66: 未处理的易出错调用
### 2. crates/bat-cas-engine/src/storage.rs
**糟糕指数: 18.91**
**问题**: 🔄 复杂度问题: 2, 📋 重复问题: 1, 🏗️ 结构问题: 1, ❌ 错误处理问题: 8, 📝 注释问题: 1
- 🔄 `list()` L211: 认知复杂度: 18
- 🔄 `list()` L211: 嵌套深度: 5
- 📋 `test_put_and_get()` L263: 重复模式: test_put_and_get, test_deduplication
- 🏗️ `list()` L211: 嵌套过深: 5
- ❌ L23: 未处理的易出错调用
- 🔍 ...还有 7 个问题实在太屎,列不完了
### 3. core/src/repositories/translation_repository.rs
**糟糕指数: 6.75**
**问题**: 🏗️ 结构问题: 1, ❌ 错误处理问题: 2, 📝 注释问题: 1
- ❌ L414: 未处理的易出错调用
- ❌ L422: 未处理的易出错调用
### 4. adapters/src/unity/unity_2021_3.rs
**糟糕指数: 6.68**
**问题**: 🏗️ 结构问题: 1, ❌ 错误处理问题: 2, 📝 注释问题: 1
- 🏗️ `detect_unity_version()` L18: 中等嵌套: 3
- ❌ L74: 未处理的易出错调用
- ❌ L81: 未处理的易出错调用
### 5. core/src/repositories/resource_repository.rs
**糟糕指数: 6.45**
**问题**: ❌ 错误处理问题: 2, 📝 注释问题: 1
- ❌ L369: 未处理的易出错调用
- ❌ L371: 未处理的易出错调用
### 6. adapters/src/unity/adapter.rs
**糟糕指数: 6.45**
**问题**: ❌ 错误处理问题: 1, 📝 注释问题: 1
- ❌ L81: 未处理的易出错调用
### 7. adapters/src/client/integration.rs
**糟糕指数: 6.45**
**问题**: ❌ 错误处理问题: 1, 📝 注释问题: 1
- ❌ L117: 未处理的易出错调用
### 8. adapters/src/manifest/driver.rs
**糟糕指数: 6.30**
**问题**: ❌ 错误处理问题: 1, 📝 注释问题: 1
- ❌ L69: 未处理的易出错调用
### 9. core/src/repositories/cas_repository.rs
**糟糕指数: 5.47**
**问题**: ❌ 错误处理问题: 3, 📝 注释问题: 1
- ❌ L134: 未处理的易出错调用
- ❌ L333: 未处理的易出错调用
- ❌ L361: 未处理的易出错调用
### 10. adapters/src/manifest/registry.rs
**糟糕指数: 5.12**
**问题**: 📋 重复问题: 1, ❌ 错误处理问题: 2, 📝 注释问题: 1
- 📋 `test_select_driver_success()` L268: 重复模式: test_select_driver_success, test_parse_success
- ❌ L180: 未处理的易出错调用
- ❌ L182: 未处理的易出错调用
## 诊断结论 {#conclusion}
🌸 **偶有异味** - 基本没事,但是有伤风化
👍 继续保持,你是编码界的一股清流,代码洁癖者的骄傲
---
*由 [fuck-u-code](https://github.com/Done-0/fuck-u-code) 生成*