* Validate a single file * @param {string} filePath - Path to the YAML file * @returns {boolean} True if valid, false otherwise
(filePath)
| 43 | * @returns {boolean} True if valid, false otherwise |
| 44 | */ |
| 45 | function 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 |
no test coverage detected