Files
odfstudio/heatmap-short-list-interesting-file.sh
T
elioperdreau 9f2c8403f2 odfstudio: clean up whitespace
Change-Id: I73e4876f845f70e0b02fee14463ff1dd2f614be4
2026-09-16 22:04:05 +02:00

39 lines
983 B
Bash
Executable File

#!/bin/sh
git log --since="3 years ago" \
--numstat \
--pretty=format:"COMMIT" |
awk '
/^COMMIT/ { next }
/^[0-9]/ {
file = $3
# Keep only hand-written core code
if (file !~ /^(sw|sd|sc|vcl|desktop|framework)\//) next
# Exclude generated / mechanical code
if (file ~ /^include\/com\/sun\/star\//) next
if (file ~ /^offapi\//) next
if (file ~ /^udkapi\//) next
if (file ~ /^workdir\//) next
if (file ~ /^translations\//) next
if (file ~ /^helpcontent2/) next
if (file ~ /\.mk$/) next
if (file ~ /^configure(\.ac|\.in)?$/) next
if (file ~ /^download\.lst$/) next
if (file ~ /^solenv\//) next
commits[file]++
churn[file] += $1 + $2
}
END {
for (f in commits) {
# Sweet spot: rarely touched, but not trivial
if (commits[f] >= 3 && commits[f] <= 40 && churn[f] >= 20)
printf "%4d commits | %6d churn | %s\n",
commits[f], churn[f], f
}
}' |
sort -n