Skip to content

Commit 964d89b

Browse files
authored
Merge pull request #2853 from tarlepp/chore(tools)/project-stats-update
Chore(tools) - Updated `project-stats.sh` script to cover all project related files
2 parents 7aa9ff9 + af96c69 commit 964d89b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/project-stats.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ printf "%-15s %10s %14s\n" "Extension" "File count" "Line count"
44

55
echo -e "-----------------------------------------"
66

7-
find ./src -type f -iname '*.*' | sed -n 's/.*\.//p' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | while read count extension; do
8-
line_count=$(find ./src -name "*.$extension" -type f -print0 | xargs -0 cat | wc -l)
7+
find ./migrations ./public ./src ./tests -type f -iname '*.*' | sed -n 's/.*\.//p' | tr '[:upper:]' '[:lower:]' | sort | uniq -c | while read count extension; do
8+
line_count=$(find ./src ./tests -name "*.$extension" -type f -print0 | xargs -0 cat | wc -l)
99
printf "%-15s %10d %14d\n" ".$extension" "$count" "$line_count"
1010
done
1111

1212
echo -e "-----------------------------------------"
1313

14-
total_files=$(find ./src -type f | wc -l)
15-
total_lines=$(find ./src -type f -exec cat {} + | wc -l)
14+
total_files=$(find ./migrations ./public ./src ./tests -type f | wc -l)
15+
total_lines=$(find ./migrations ./public ./src ./tests -type f -exec cat {} + | wc -l)
1616

1717
printf "%-15s %10d %14d\n" "Total:" "$total_files" "$total_lines"

0 commit comments

Comments
 (0)