fetch_ml/cli/fix_arraylist.sh
Jeremie Fraeys 27c8b08a16
test: Reorganize and add unit tests
Reorganize tests for better structure and coverage:
- Move container/security_test.go from internal/ to tests/unit/container/
- Move related tests to proper unit test locations
- Delete orphaned test files (startup_blacklist_test.go)
- Add privacy middleware unit tests
- Add worker config unit tests
- Update E2E tests for homelab and websocket scenarios
- Update test fixtures with utility functions
- Add CLI helper script for arraylist fixes
2026-02-18 21:28:13 -05:00

14 lines
445 B
Bash

#!/bin/bash
# Fix ArrayList Zig 0.15 syntax
cd /Users/jfraeys/Documents/dev/fetch_ml/cli/src
for f in $(find . -name "*.zig" -exec grep -l "ArrayList" {} \;); do
# Fix .deinit() -> .deinit(allocator)
sed -i '' 's/\.deinit();/.deinit(allocator);/g' "$f"
# Fix .toOwnedSlice() -> .toOwnedSlice(allocator)
sed -i '' 's/\.toOwnedSlice();/.toOwnedSlice(allocator);/g' "$f"
done
echo "Fixed deinit and toOwnedSlice patterns"