* Format validation errors for display * @param {object} result - Result from validateEntry * @returns {string} Formatted error message
(result)
| 62 | * @returns {string} Formatted error message |
| 63 | */ |
| 64 | function formatValidationErrors(result) { |
| 65 | if (result.valid) return ''; |
| 66 | |
| 67 | const lines = [`Validation failed for ${result.filePath}:`]; |
| 68 | for (const err of result.errors) { |
| 69 | lines.push(` - ${err.path}: ${err.message}`); |
| 70 | } |
| 71 | return lines.join('\n'); |
| 72 | } |
| 73 | |
| 74 | module.exports = { validateEntry, formatValidationErrors, getValidator }; |
no outgoing calls
no test coverage detected