first pass of merging in warp (doesn't build)

This commit is contained in:
Ryan Ward
2026-07-01 16:08:58 -05:00
parent 2f64909469
commit 4770ac06b5
3662 changed files with 414574 additions and 89772 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
set -e
cd "$(dirname "$0")/.."
matches=$(
find . \
\( -path './.git' -o -path './target' \) -prune -o \
-type f \
-name '*.rs' \
-exec grep -nE '^[[:space:]]*mod[[:space:]]+tests[[:space:]]*\{' {} + || true
)
if [[ -z "$matches" ]]; then
exit 0
fi
cat <<'EOF'
Inline Rust test modules are not allowed. Move test code into a sibling `_tests.rs`
file and include it from the original module like this:
```
#[cfg(test)]
#[path = "..._tests.rs"]
mod tests;
```
EOF
while IFS= read -r match; do
file=${match%%:*}
rest=${match#*:}
line=${rest%%:*}
if [[ "${GITHUB_ACTIONS:-}" == "true" ]]; then
echo "::error file=${file#./},line=$line::Move this inline test module to a sibling _tests.rs file."
else
echo "$match"
fi
done <<< "$matches"
exit 1