Add file details to copyright header check failure output
Build and Push Docker Image / build (push) Successful in 19s
Licence Check / Licence compatibility and copyright header verification (push) Failing after 37s
CI / Security audit (push) Successful in 52s
CI / Tests & coverage (push) Failing after 53s

When copyright header check fails, now outputs the actual first 5 lines
of each failing file to help diagnose the issue.
This commit is contained in:
2026-05-21 00:40:41 +01:00
parent 8f19da3ae6
commit fd303699db
+3
View File
@@ -81,6 +81,9 @@ jobs:
if ! head -n 5 "$file" | grep -qiE "Copyright.*[0-9]{4}.*MIT"; then
echo "❌ Missing MIT-compliant copyright header in: $file"
echo " Required format: // Copyright (c) YYYY Name. MIT License."
echo " Actual first 5 lines:"
head -n 5 "$file" | sed 's/^/ /'
echo ""
MISSING_HEADER=$((MISSING_HEADER + 1))
fi
done <<< "$SOURCE_FILES"