MCPcopy Index your code
hub / github.com/markdoc/markdoc / formatValidation

Function formatValidation

spec/marktest/index.ts:82–98  ·  view source on GitHub ↗
(filename, test, validation)

Source from the content-addressed store, hash-verified

80}
81
82function formatValidation(filename, test, validation) {
83 const { $$lines: lines, name, code } = test;
84
85 let output = '';
86 for (const {
87 lines,
88 error: { message },
89 } of validation)
90 output += `${lines ? lines[0] : '?'}:${message}\n`;
91
92 return [
93 `\x1b[31mINVALID:\x1b[0m ${filename}:${lines.start}`,
94 name,
95 code,
96 output,
97 ].join('\n\n');
98}
99
100(async () => {
101 const [filename, line] = process.argv.slice(2).join('').split(':');

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…