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

Function validateFile

scripts/validate.js:45–59  ·  view source on GitHub ↗

* Validate a single file * @param {string} filePath - Path to the YAML file * @returns {boolean} True if valid, false otherwise

(filePath)

Source from the content-addressed store, hash-verified

43 * @returns {boolean} True if valid, false otherwise
44 */
45function validateFile(filePath) {
46 const data = loadYamlFile(filePath);
47 if (!data) {
48 return false;
49 }
50
51 const result = validateEntry(data, filePath);
52 if (result.valid) {
53 console.log(`✓ ${filePath}`);
54 } else {
55 console.error(formatValidationErrors(result));
56 }
57
58 return result.valid;
59}
60
61/**
62 * Main validation function

Callers 1

mainFunction · 0.85

Calls 3

loadYamlFileFunction · 0.85
validateEntryFunction · 0.85
formatValidationErrorsFunction · 0.85

Tested by

no test coverage detected