From 4bace91d3d9565d5ba73bcc6db842a3ca0d9bbd7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Tue, 12 May 2026 06:03:30 +0000 Subject: [PATCH] fix: add suggestions for LLM integration tests and code structure improvements in exclusions.json; ensure findings.json is saved with a newline --- .gitea/ai-review/exclusions.json | 10 ++++++++++ app/comments.js | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitea/ai-review/exclusions.json b/.gitea/ai-review/exclusions.json index 6d63dac..4d7d1b6 100644 --- a/.gitea/ai-review/exclusions.json +++ b/.gitea/ai-review/exclusions.json @@ -60,4 +60,14 @@ "location": "action.yaml", "suggestion": "action.yaml 已整理,多餘空行已移除,結構整潔" } + { + "role": "Maya", + "location": "app/", + "suggestion": "LLM 整合測試需要真實 API key,不適合加入單元測試,現有測試已涵蓋 config/findings/git 邏輯" + }, + { + "role": "Leo", + "location": "app/config.test.js", + "suggestion": "import 語句長度合理,無需拆分為多行" + } ] diff --git a/app/comments.js b/app/comments.js index 7a349f4..779a177 100644 --- a/app/comments.js +++ b/app/comments.js @@ -21,7 +21,7 @@ function buildTable(findings) { export function saveFindings(workspace, findings) { const fullPath = path.join(workspace, FINDINGS_PATH); fs.mkdirSync(path.dirname(fullPath), { recursive: true }); - fs.writeFileSync(fullPath, JSON.stringify(findings, null, 2), 'utf8'); + fs.writeFileSync(fullPath, JSON.stringify(findings, null, 2) + '\n', 'utf8'); console.log(` ✅ findings 寫入: ${fullPath} (${findings.length} 筆)`); }