MCPcopy Index your code
hub / github.com/awesome-opencode/awesome-opencode / formatValidationErrors

Function formatValidationErrors

scripts/utils/validation.js:64–72  ·  view source on GitHub ↗

* Format validation errors for display * @param {object} result - Result from validateEntry * @returns {string} Formatted error message

(result)

Source from the content-addressed store, hash-verified

62 * @returns {string} Formatted error message
63 */
64function 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
74module.exports = { validateEntry, formatValidationErrors, getValidator };

Callers 3

generateCategorySectionFunction · 0.85
validateFileFunction · 0.85
loadEntriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected