Created
April 2, 2015 13:37
-
-
Save jakzal/7134b1c7a018d349863a to your computer and use it in GitHub Desktop.
Find unused methods in a PHP code base
This file contains 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 'function.*\(' | \ | |
sed -e 's/.*function \([^(]*\)(.*/\1/g' | \ | |
sort -u | \ | |
xargs -I% bash -c "[ `ag '%\(' | wc -l` == 1 ] && echo %" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment