MCPcopy Create free account
hub / github.com/SAP/ui5-project / getYamlExtract

Method getYamlExtract

lib/validation/ValidationError.js:272–280  ·  view source on GitHub ↗
({error, yaml})

Source from the content-addressed store, hash-verified

270 }
271
272 static getYamlExtract({error, yaml}) {
273 const {line, column} = ValidationError.analyzeYamlError({error, yaml});
274 if (line !== -1 && column !== -1) {
275 return chalk.grey(yaml.path + ":" + line) +
276 "\n\n" + ValidationError.getSourceExtract(yaml.source, line, column);
277 } else {
278 return chalk.grey(yaml.path) + "\n";
279 }
280 }
281}
282
283export default ValidationError;

Callers 2

formatErrorMethod · 0.80
ValidationError.jsFile · 0.80

Calls 2

analyzeYamlErrorMethod · 0.80
getSourceExtractMethod · 0.80

Tested by

no test coverage detected