From 49b14d5d03aa3eeceef97a825ce2c52a7de26000 Mon Sep 17 00:00:00 2001 From: Frank Harris Date: Mon, 15 Jun 2026 10:38:49 -0500 Subject: [PATCH] test --- reports/errors.md | 12 ++++++++++++ validate.yml | 30 ++++++++++++++++-------------- 2 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 reports/errors.md diff --git a/reports/errors.md b/reports/errors.md new file mode 100644 index 0000000..b826965 --- /dev/null +++ b/reports/errors.md @@ -0,0 +1,12 @@ +# Validation Summary + +- Files Checked: 3 +- Warnings: 1 +- Errors: 1 + +## Detailed Results + +- OK: bash -n passed: tools/validate-code.sh +- OK: bash -n passed: tools/project-report.sh +- Warning: yamllint not installed; skipping validate.yml +- Error: php -l failed: index.php \| Errors parsing /home/dev/Documents/customer-test/index.php \| PHP Parse error: syntax error, unexpected end of file, expecting "," or ";" in /home/dev/Documents/customer-test/index.php on line 5 diff --git a/validate.yml b/validate.yml index 632c6f0..6bcbf11 100644 --- a/validate.yml +++ b/validate.yml @@ -9,21 +9,23 @@ jobs: runs-on: linux-dev steps: - - name: Checkout repo + - name: Checkout repository uses: actions/checkout@v4 - - name: Check PHP syntax + - name: Run validation run: | - if find . -name "*.php" | grep -q .; then - find . -name "*.php" -print0 | xargs -0 -n1 php -l - else - echo "No PHP files found." - fi + chmod +x tools/validate-code.sh - - name: Check C# build - run: | - if find . -name "*.csproj" | grep -q .; then - dotnet build - else - echo "No C# project found." - fi \ No newline at end of file + ./tools/validate-code.sh || { + echo "" + echo "===== VALIDATION FAILED =====" + echo "" + + if [ -f reports/errors.md ]; then + cat reports/errors.md + else + echo "No reports/errors.md file was created." + fi + + exit 1 + }