Public release release-f8ee5fc25a1d

Source commit: f8ee5fc25a1d0fed1e59b3f34d534b395bf34dad

Public tree identity: sha256:a428db3c520f7c0779135e36a841a5102ed26070519b696a146dbfa54514bd52
This commit is contained in:
Clusterflux release 2026-07-19 15:51:02 +02:00
commit 94d1716637
221 changed files with 81104 additions and 0 deletions

27
scripts/check-code-size.sh Executable file
View file

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$repo_root"
maximum_lines=3000
failed=0
source_roots=(crates)
if [[ -d private/hosted-policy/src ]]; then
source_roots+=(private/hosted-policy/src)
fi
while IFS= read -r -d '' file; do
case "$file" in
*/tests.rs|*/tests/*) continue ;;
esac
lines="$(wc -l < "$file")"
if ((lines > maximum_lines)); then
printf '%s has %s lines; production file limit is %s\n' "$file" "$lines" "$maximum_lines" >&2
failed=1
fi
done < <(find "${source_roots[@]}" -type f -name '*.rs' -print0)
if ((failed)); then
exit 1
fi
printf 'production source file size guard passed (%s lines maximum)\n' "$maximum_lines"