Skip to content

Instantly share code, notes, and snippets.

@Davidslv
Forked from joelittlejohn/find-unused-clj.sh
Last active December 1, 2016 09:18
Show Gist options
  • Save Davidslv/ebf9a64e71cd916d776d5fe7ec01435f to your computer and use it in GitHub Desktop.
Save Davidslv/ebf9a64e71cd916d776d5fe7ec01435f to your computer and use it in GitHub Desktop.
find unused code..
#!/bin/bash
for f in $(egrep -o -R "def?-? [^ ]*" * --include '*.rb' | cut -d \ -f 2 | sort | uniq); do
echo $f $(grep -R --include '*.rb' -- "$f" * | wc -l);
done | grep " 1$"
@Davidslv
Copy link
Author

Davidslv commented Dec 1, 2016

This is for ruby files instead of clojure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment