(f)
| 223 | return validateTypeScriptString(value); |
| 224 | } |
| 225 | async function validateSingleFile(f) { |
| 226 | if (typeof f.content !== "string" || f.content.trim().length === 0) { |
| 227 | (0, metrics_1.counter)("cognition.validate.failed", { mode: "ast_compiles", kind: "empty_file" }); |
| 228 | return { ok: false, issues: [`${f.path}: content must be a non-empty TypeScript string`] }; |
| 229 | } |
| 230 | const inner = await validateTypeScriptString(f.content); |
| 231 | if (inner.ok) |
| 232 | return inner; |
| 233 | return { ok: false, issues: inner.issues.map(i => `${f.path}: ${i}`) }; |
| 234 | } |
| 235 | async function validateFileList(files) { |
| 236 | if (files.length === 0) { |
| 237 | (0, metrics_1.counter)("cognition.validate.failed", { mode: "ast_compiles", kind: "empty_list" }); |
no test coverage detected