Repository Public
1#!/usr/bin/env bash2# Author: Simon-Pierre Boucher — contact@spboucher.ai3# File: Scripts/check-headers.sh4# Description: Fails when a first-party source file lacks the author header (Author / File / Description).5set -uo pipefail6cd "$(dirname "$0")/.."7FAIL=08while IFS= read -r f; do9 [[ -f "$f" ]] || continue10 head -12 "$f" | grep -q "Author: Simon-Pierre Boucher" && head -12 "$f" | grep -q "File: " && head -12 "$f" | grep -q "Description: " || { echo "missing header: $f"; FAIL=1; }11done < <(git ls-files -co --exclude-standard | grep -E '\.(swift|sh|py|yml)$' | grep -viE '^(build|dist)/')12[[ $FAIL -eq 0 ]] && echo "headers OK ($(git ls-files -co --exclude-standard | grep -cE '\.(swift|sh|py|yml)$') files)"13exit $FAIL14