Skip to content

Commit 3a9edb1

Browse files
committed
Updated test ignore patterns
1 parent 51af102 commit 3a9edb1

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

test_on_cpp2_files.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/bin/bash
2+
3+
# Usage: ./test_on_cpp2_files.sh /path/to/directory
4+
25
set -e
36

47
# Directory to search
@@ -13,10 +16,15 @@ exclude_patterns=(
1316
"msvc-msstl-e.cpp2"
1417
"gcc-10-libstdc++-e.cpp2"
1518
"clang-12-libstdc++-e.cpp2"
19+
"pure2-bugfix-for-bad-decltype-error.cpp2"
20+
"pure2-bugfix-for-bad-parameter-error.cpp2"
21+
"pure2-bugfix-for-bad-using-error.cpp2"
22+
"pure2-bugfix-for-naked-unsigned-char-error.cpp2"
23+
"pure2-bugfix-for-namespace-error.cpp2"
1624
)
1725

26+
# Build the find command
1827
find_command="find \"$search_dir\" -type f \( -name \"*.cpp2\" -o -name \"*.h2\" \)"
19-
2028
for pattern in "${exclude_patterns[@]}"; do
2129
find_command+=" ! -name \"$pattern\""
2230
done
@@ -26,17 +34,15 @@ if [ -f cpp2_files.txt ]; then
2634
exit 1
2735
fi
2836

29-
# find_command="$find_command -exec sh -c 'tree-sitter parse -q "\$1" || exit 255' _ {} \;"
30-
echo "Command: " $find_command
37+
# Ensure that cpp2_files.txt is removed on exit (even if an error occurs)
38+
trap 'rm cpp2_files.txt' EXIT
39+
40+
echo "Command: $find_command"
3141
eval $find_command > cpp2_files.txt
3242

3343
while IFS= read -r file; do
3444
echo "Parsing '$file'"
3545
tree-sitter parse -q "$file"
3646
done < cpp2_files.txt
3747

38-
rm cpp2_files.txt
39-
4048
echo "Done"
41-
42-
# Usage: ./test_on_cpp2_files.sh /path/to/directory

0 commit comments

Comments
 (0)