Created
February 13, 2015 15:12
-
-
Save mrnugget/e707d308b6de487fcd50 to your computer and use it in GitHub Desktop.
The Hall Of Blame - Find out who put the most TODOs in the codebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ag is the_silver_searcher (https://github.com/ggreer/the_silver_searcher) | |
| ag TODO | while read line; do | |
| file=$(echo ${line} | awk -F ':' '{print $1}'); | |
| lineno=$(echo ${line} | awk -F ':' '{print $2}'); | |
| git blame --line-porcelain "./${file}" -L ${lineno},${lineno} | grep author-mail | cut -d ' ' -f 2; | |
| done | sort | uniq -c | |
| # Example output: | |
| # 30 <[email protected]> | |
| # 20 <[email protected]> | |
| # 7 <[email protected]> | |
| # 3 <[email protected]> | |
| # 3 <[email protected]> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment