chore: add additional exclusions for naming mismatches and validation suggestions in ai-review
This commit is contained in:
@@ -35,6 +35,21 @@
|
||||
"location": "entrypoint.sh:91",
|
||||
"title": "parse_repo_context invalid-input test suggestion",
|
||||
"reason": "新增 `parse_repo_context` 的測試案例,驗證在以下無效輸入時會正確失敗:空字串或僅含空白字元、不含斜線的字串、包含多個斜線的字串、只有斜線的字串、只有 owner 或只有 repo 的字串。建議:為上述邊界與無效格式情境撰寫單元測試,以驗證解析函數的健壯性並確保在錯誤輸入時有明確行為。"
|
||||
},
|
||||
{
|
||||
"location": "entrypoint.sh:183",
|
||||
"title": "collect_package_candidates kept_versions naming mismatch",
|
||||
"reason": "在 `collect_package_candidates` 中,變數 `kept_versions` 與其他參數命名不一致。建議:修正為 `keep_count` 以保持命名一致並避免邏輯錯誤。"
|
||||
},
|
||||
{
|
||||
"location": "entrypoint.sh:129",
|
||||
"title": "fetch_package_versions PAGE_LIMIT validation suggestion",
|
||||
"reason": "`fetch_package_versions` 中對 `PAGE_LIMIT` 的驗證邏輯有誤(目前用法不正確)。建議:改用正確的數字檢查,例如 `[[ \"$limit\" =~ ^[0-9]+$ ]]`,並處理 0、負數或空值等邊界情況。"
|
||||
},
|
||||
{
|
||||
"location": "entrypoint.sh:248",
|
||||
"title": "main missing-token failure test suggestion",
|
||||
"reason": "`main` 中當 `resolve_token` 無法解析到 Gitea token(例如 `RUNNER_TOKEN` 未設定)時,腳本應該正確失敗。建議:新增測試覆蓋該失敗路徑,確保在無 token 時腳本會安全中止並產生明確錯誤訊息。"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user