Skip to content

Instantly share code, notes, and snippets.

@yammesicka
Created July 10, 2019 10:10
Show Gist options
  • Save yammesicka/f6e80b70220c6fde8b9af7fbb6647b3c to your computer and use it in GitHub Desktop.
Save yammesicka/f6e80b70220c6fde8b9af7fbb6647b3c to your computer and use it in GitHub Desktop.
How ruined my Python repo (flake8 + git)
flake8 | egrep .+?\:.+?:.+?:.+? | cut -d: -f1 | sort | uniq -c | sort -nr | head -n50 | awk ' { cmd = "git ls-tree -r -z --name-only HEAD -- " $2 " | xargs -0 -n1 git blame --line-porcelain HEAD |grep -oP \"^author \\K(.+)\"|sort|uniq -c|sort -nr|head -n1"; topDestroy = ((cmd | getline line) > 0 ? line : "failed"); close(cmd); print $1 "\t" $2 "\t" topDestroy; } ' | column -ts $'\t'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment