technomancy / slamhound

Slamhound rips your namespace form apart and reconstructs it.
Other
473 stars 38 forks source link

~ files attempted #36

Closed kenrestivo closed 11 years ago

kenrestivo commented 11 years ago

In directory mode, when run from the command line, slamhound appears to be attempting to process foo.clj~ emacs tmp files, which is weird.

This fixes it:

diff --git a/src/slam/hound.clj b/src/slam/hound.clj
index 9c3d273..323e89c 100644
--- a/src/slam/hound.clj
+++ b/src/slam/hound.clj
@@ -34,7 +34,7 @@
   [& file-or-dirs]
   (doseq [file-or-dir file-or-dirs
           file (file-seq (io/file file-or-dir))
-          :when (re-find #"/[^\./]+\.clj" (str file))]
+          :when (re-find #"/[^\./]+\.clj$" (str file))]
     (try
       (swap-in-reconstructed-ns-form file)
       (catch Exception e
kenrestivo commented 11 years ago

This is now https://github.com/technomancy/slamhound/pull/38