Commit d218a0b 1 parent d348824 commit d218a0b Copy full SHA for d218a0b
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,13 @@ jobs:
58
58
shell : bash
59
59
run : |
60
60
echo "for_loop_count=0" >> $GITHUB_ENV
61
+ echo "for_loop_count_in_file=0" >> $GITHUB_ENV
61
62
62
63
find . -type f -name '*.rs' | while read -r file; do
63
64
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))
67
68
done
68
69
echo "for loop occurrences: $for_loop_count"
69
70
You can’t perform that action at this time.
0 commit comments