Skip to content

Commit d218a0b

Browse files
committed
another different attempt
1 parent d348824 commit d218a0b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/bench-test.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ jobs:
5858
shell: bash
5959
run: |
6060
echo "for_loop_count=0" >> $GITHUB_ENV
61+
echo "for_loop_count_in_file=0" >> $GITHUB_ENV
6162
6263
find . -type f -name '*.rs' | while read -r file; do
6364
echo "Checking $file"
64-
echo "Count in file: $(grep -oE 'for\s+(\([^)]+\)|\w+)\s+in\s+[^{]+' "$file" | wc -l)"
65-
for_loop_count_in_file=$((for_loop_count_in_file + 0))
66-
((for_loop_count = for_loop_count + for_loop_count_in_file))
65+
for_loop_count_in_file=$(grep -oE 'for\s+(\([^)]+\)|\w+)\s+in\s+[^{]+' "$file" | wc -l)
66+
echo "Count in file: $for_loop_count_in_file"
67+
((for_loop_count += $for_loop_count_in_file))
6768
done
6869
echo "for loop occurrences: $for_loop_count"
6970

0 commit comments

Comments
 (0)