Track Code History With Qi
qi iterates
over git
commit dates to print reports.
Here’s the disk usage of the Linux source code from 2005 to the year of this writing.
[sage linux]$ qi --every year --past "12 years" -c "du -sh ."
2.8G . # 2017 (time of writing)
2.7G . # 2016
2.6G . # 2015
2.6G . # 2014
2.5G . # 2013
2.5G . # 2012
2.4G . # 2011
2.4G . # 2010
2.4G . # 2009
2.3G . # 2008
2.2G . # 2007
2.2G . # 2006
2.2G . # 2005
Here’s a monthly complexity report of the React source.
qi --every month --past "3 years" --command "./analyze.sh"
#!/bin/bash
# analyze.sh
TIME=$(git show -s --format=%ct HEAD)
# Using https://www.npmjs.com/package/complexity-report
cr -e -f json ./src > $(git show -s --format=%ct HEAD).json