fix: add suggestions for LLM integration tests and code structure improvements in exclusions.json; ensure findings.json is saved with a newline

This commit is contained in:
2026-05-12 06:03:30 +00:00
parent e541cee83f
commit 4bace91d3d
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -60,4 +60,14 @@
"location": "action.yaml", "location": "action.yaml",
"suggestion": "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 語句長度合理,無需拆分為多行"
}
] ]
+1 -1
View File
@@ -21,7 +21,7 @@ function buildTable(findings) {
export function saveFindings(workspace, findings) { export function saveFindings(workspace, findings) {
const fullPath = path.join(workspace, FINDINGS_PATH); const fullPath = path.join(workspace, FINDINGS_PATH);
fs.mkdirSync(path.dirname(fullPath), { recursive: true }); 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} 筆)`); console.log(` ✅ findings 寫入: ${fullPath} (${findings.length} 筆)`);
} }