Skip to content

Instantly share code, notes, and snippets.

View JonathanHarford's full-sized avatar
💭
true(1): Do nothing, successfully.

Jonathan Harford JonathanHarford

💭
true(1): Do nothing, successfully.
View GitHub Profile
@joelittlejohn
joelittlejohn / find-unused-clj.sh
Last active November 6, 2020 16:56
Very quick and dirty command to find unused functions and vars in a Clojure project
#!/bin/bash
for f in $(egrep -o -R "defn?-? [^ ]*" * --include '*.clj' | cut -d \ -f 2 | sort | uniq); do
echo $f $(grep -R --include '*.clj' -- "$f" * | wc -l);
done | grep " 1$"