]> git.notmuchmail.org Git - notmuch/commitdiff
devel: script to calculate a list of authors.
authorDavid Bremner <david@tethera.net>
Wed, 3 Jun 2020 16:05:12 +0000 (13:05 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 5 Jun 2020 10:00:35 +0000 (07:00 -0300)
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.

devel/author-scan.sh [new file with mode: 0644]

diff --git a/devel/author-scan.sh b/devel/author-scan.sh
new file mode 100644 (file)
index 0000000..2d9c4af
--- /dev/null
@@ -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