#!/bin/bash # scripts/validate_yaml.sh # # Validates YAML syntax for all Adaptive Lighting system files set -e echo "Validating Adaptive Lighting Mode System YAML files..." echo "========================================================" # Check if yamllint is installed if ! command -v yamllint &> /dev/null; then echo "ERROR: yamllint not found." echo "Install with: pip install yamllint" echo "Or run with: nix run nixpkgs#yamllint -- " exit 1 fi # Validate packages echo "" echo "Validating packages..." for file in packages/*.yaml; do echo " - $file" yamllint -d '{extends: default, rules: {line-length: {max: 120}}}' "$file" done # Validate blueprints echo "" echo "Validating blueprints..." for file in blueprints/automation/*.yaml; do echo " - $file" yamllint -d '{extends: default, rules: {line-length: {max: 120}}}' "$file" done echo "" echo "✓ All YAML files are valid!"