summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2020-06-03 13:05:12 -0300
committerDavid Bremner <david@tethera.net>2020-06-05 07:00:35 -0300
commit55619625eb08f046e4e02ebc43f4aefa8903c638 (patch)
treefc93d15b46ed983f8f7c33631fbc577d3a7b695a /devel
parentba35784114dfcd72978fae195063a49120ffef38 (diff)
devel: script to calculate a list of authors.
As an initial heuristic, report anyone with at least 15 lines of code in the current source tree. Test corpora are excluded, although probabably this doesn't change much about the list of authors produced.
Diffstat (limited to 'devel')
-rw-r--r--devel/author-scan.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/devel/author-scan.sh b/devel/author-scan.sh
new file mode 100644
index 00000000..2d9c4af8
--- /dev/null
+++ b/devel/author-scan.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+FILE_EXCLUDE='corpora'
+AUTHOR_EXCLUDE='uncrustify'
+# based on the FSF guideline, for want of a better idea.
+THRESHOLD=15
+
+git ls-files | grep -v -e "$FILE_EXCLUDE" | xargs -n 1 -d \\n \
+ git blame -w --line-porcelain -- | \
+ sed -n "/$AUTHOR_EXCLUDE/d; s/^[aA][uU][tT][hH][Oo][rR] //p" | \
+ sort -fd | uniq -ic | awk "\$1 >= $THRESHOLD" | sort -nr