Add Cargo workspace, crate skeletons and the gate
Implemented-By: Laguna S 2.1 (OpenCode)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# Fails if any *.rs file under ROOT/crates has more than 500 lines.
|
||||
# Files under any target/ directory are ignored. Test files count.
|
||||
ROOT="${1:-.}"
|
||||
|
||||
bad=$(find "$ROOT/crates" -type f -name '*.rs' ! -path '*/target/*' \
|
||||
-exec awk 'END { exit !(NR > 500) }' {} \; -print 2>/dev/null)
|
||||
if [ -n "$bad" ]; then
|
||||
echo "$bad" | while read -r f; do
|
||||
[ -n "$f" ] && echo "check-lines: $f" >&2
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user