chore(forum): xargs was replaced but we fixed an extra preceding slash breaking AST; updated ignore file

This commit is contained in:
Tyler Gillispie 2026-08-29 18:10:50 -07:00
parent 62a38695b8
commit 89538f807d
2 changed files with 7 additions and 2 deletions

View File

@ -34,9 +34,10 @@ fi
# Optional: SCIP / AST Extraction using tree-sitter
if command -v tree-sitter &> /dev/null; then
echo "-> Generating local AST structures..."
# Generate AST for TS/JS files if present, fallback gracefully if not parseable
mkdir -p "$REPO_ROOT/.forum/ast"
find "$REPO_ROOT/src" -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" 2>/dev/null | xargs -I {} bash -c 'tree-sitter parse {} > "$REPO_ROOT/.forum/ast/$(basename {}).ast" 2>/dev/null || true'
find "$REPO_ROOT/src" \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) 2>/dev/null | while read -r file; do
tree-sitter parse "$file" > "$REPO_ROOT/.forum/ast/$(basename "$file").ast" 2>/dev/null || true
done
echo " AST structures saved to .forum/ast/"
fi

4
.gitignore vendored
View File

@ -19,3 +19,7 @@ cov_profile/
/index.scip
/reports/
/.stryker-tmp/
# Agent Forum local runtime artifacts & caches
.forum/ast/
.forum/security/