Skip to content

Commit be907e3

Browse files
committed
readd .rs file different approach
1 parent 33b620f commit be907e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/bench-test.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ jobs:
3232
- name: initialize counters
3333
working-directory: ./${{ matrix.project }}
3434
run: |
35-
echo "for_loop_count=0" >> $GITHUB_ENV
3635
echo "for_loop_count_after=0" >> $GITHUB_ENV
37-
echo "for_loop_count_in_file=0" >> $GITHUB_ENV
3836
echo "for_loop_count_after_in_file=0" >> $GITHUB_ENV
3937
echo "iter_count=0" >> $GITHUB_ENV
4038
echo "iter_count_after=0" >> $GITHUB_ENV
@@ -59,7 +57,11 @@ jobs:
5957
working-directory: ./${{ matrix.project }}
6058
shell: bash
6159
run: |
62-
while read -r file; do
60+
mapfile -t rs_files < <(find . -type f -name '*.rs')
61+
echo "for_loop_count=0" >> $GITHUB_ENV
62+
echo "for_loop_count_in_file=0" >> $GITHUB_ENV
63+
64+
for file in "${rs_files[@]}"; do
6365
echo "Checking $file"
6466
for_loop_count_in_file=$(grep -oE 'for\s+(\([^)]+\)|\w+)\s+in\s+[^{]+' "$file" | wc -l)
6567
echo "Count in file: $for_loop_count_in_file"

0 commit comments

Comments
 (0)