Commit 24333e8 1 parent 1521dc3 commit 24333e8 Copy full SHA for 24333e8
File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,11 @@ jobs:
57
57
working-directory : ./${{ matrix.project }}
58
58
shell : bash
59
59
run : |
60
- mapfile -t rs_files < <(find . -type f -name '*.rs' -exec readlink -f {} \;)
61
60
echo "for_loop_count=0" >> $GITHUB_ENV
62
- echo "for_loop_count_in_file=0" >> $GITHUB_ENV
63
61
64
- for file in "${rs_files[@]}" ; do
62
+ find . -type f -name '*.rs' | while read -r file ; do
65
63
echo "Checking $file"
66
- for_loop_count_in_file=$(grep -oE 'for\s+(\([^)]+\)|\w+)\s+in\s+[^{]+' "$file" | wc -l)
67
- echo "Count in file: $for_loop_count_in_file"
64
+ echo "Count in file: $(grep -oE 'for\s+(\([^)]+\)|\w+)\s+in\s+[^{]+' "$file" | wc -l)"
68
65
((for_loop_count += for_loop_count_in_file))
69
66
done
70
67
echo "for loop occurrences: $for_loop_count"
You can’t perform that action at this time.
0 commit comments